From patchwork Sat Jun 8 09:05:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ross X-Patchwork-Id: 49697 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:c209:0:b0:460:55fa:d5ed with SMTP id d9csp1488627vqo; Sat, 8 Jun 2024 02:06:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1Yd/NUQQG4VusLBVSm9iVwVb/0sp+TxzCv6ORZJGSNEkH3YjPIbHtyH2yi85VW62SwXxR1zL3LSCedqBG/5TEMe4VSxhlJRsSXw== X-Google-Smtp-Source: AGHT+IGxyZWEAK6wSMB0ctB9wASVsn9Jxt1qtFzYlf3K3f55PzT/CzkIp6zrTM7H3u2wogoyLW3J X-Received: by 2002:a19:e003:0:b0:525:32aa:443e with SMTP id 2adb3069b0e04-52bb9f78774mr3592236e87.17.1717837563683; Sat, 08 Jun 2024 02:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717837563; cv=none; d=google.com; s=arc-20160816; b=YBgc2oxtFG1QZu+itc+gv8sppK/sZh2ZJWdAkCK3LmCQ9d1B5XY4F0hXVwh2G3r2Px roqC2Q7JuKEBTOLAp6YDQGSzuRbEJcoDvpUhUm+XL9+alIxxXIr5SHVHfNET+C6QjmbQ wZyFCExosLXQIjsov4rgsTw/ENJVr5S53qcQid5+jpsDcR3urBqx57rYLnfRfwH6TYOO BjVLy2+SKnJPriWwKOTREt/moPFNo8hdisHTA5u7sKJ88OajdI4pKTAA5ywBabKzsCG1 38KDVnc9zbt6NLbdkWNnyjw4mzq/5fuK9plMrMq5vnDmNWdfN+a+sGIj5cPT95UXpz2q DeDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:in-reply-to:content-disposition:mime-version :references:message-id:to:from:date:delivered-to; bh=QHDgm+/NwzgdZ/H0BQ/J0FoIiQhusAKE0t9VUPgvLN8=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=N93uvOuEFH8gxhFSpnerN9bByEw4g8aMlCpxFjRNx1JwJRx4McATvSNFNPT0tcq75L 634xdGjtvQGFOH7SboD1T9IAejbVW1CZfuRio1L4RuA75+pNesCEYTJxBs6Rck4jkPS7 sbvKnh+O+2PR4gI03Mf7qbfef3Rjp4TUe52iMvdjVWf8RaFojPOevPMPGRii8PlubsF9 eNDh2N2zzhWodHmopoWBWrgE3bt+fna3pgzwvxPLNGHa4lS2hlHxazhUvUUiLBkSEPyG WE9kd1xC3gTN31yAJ32PhS5gqrsWOi+M/5SNEKV3LPJ1heovId3cOW0WfAecefn3bt+9 4Rjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 2adb3069b0e04-52bbe6f0dffsi846923e87.33.2024.06.08.02.06.03; Sat, 08 Jun 2024 02:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8C68C68D65A; Sat, 8 Jun 2024 12:06:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mx.sdf.org (mx.sdf.org [205.166.94.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6A16368D65A for ; Sat, 8 Jun 2024 12:05:53 +0300 (EEST) Received: from bdf7e219c104347090bad95b504a82ad ([1.145.185.203]) (authenticated (0 bits)) by mx.sdf.org (8.16.1/8.14.3) with ESMTPSA id 45895lrq016468 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Sat, 8 Jun 2024 09:05:51 GMT Date: Sat, 8 Jun 2024 19:05:41 +1000 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: <7f3201243abaa14fc4851829f2452999809c3140.1717837373.git.pross@xvid.org> References: <5b83443361479c11a5975c8dd308375a0f101e59.1717837373.git.pross@xvid.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5b83443361479c11a5975c8dd308375a0f101e59.1717837373.git.pross@xvid.org> Subject: [FFmpeg-devel] [PATCH 3/4] mm: don't fail if x offset exceeds frame width X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: AZ2kBPeKW0Fi --- libavcodec/mmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index b5b6ffd25b..3b6b9ed580 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -162,7 +162,7 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert) for(j=0; j<8; j++) { int replace = (replace_array >> (7-j)) & 1; if (x + half_horiz >= s->avctx->width) - return AVERROR_INVALIDDATA; + break; if (replace) { int color = bytestream2_get_byte(&data_ptr); s->frame->data[0][y*s->frame->linesize[0] + x] = color;