From patchwork Wed Jun 26 22:08:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ross X-Patchwork-Id: 50174 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:bc92:0:b0:482:c625:d099 with SMTP id p18csp108353vqy; Wed, 26 Jun 2024 15:09:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWRb2UGn7CiFUcZK1MxIxsotIqO8MYMX8tOEhYrG7tt8E6zR1SV45IhfPdVTyj4ZUMG6BG9eZ+qgNnhgzKcP8E+ivj0bWlVGPTkXA== X-Google-Smtp-Source: AGHT+IHtW7uU67bArTju7V6y6fuKX9Ld/PByYwtE8clGWaQeFw7J5gf4wRkQDVHZq94dIp35fY9A X-Received: by 2002:a2e:7211:0:b0:2ea:e74c:40a2 with SMTP id 38308e7fff4ca-2ec5b2d5b95mr83061791fa.20.1719439751672; Wed, 26 Jun 2024 15:09:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719439751; cv=none; d=google.com; s=arc-20160816; b=KhuXLIq5duqhs5deQ94P4clTxD1DJhWw5ccw50z1I7HhUB7K+FWiSU1yKGi7wKbhHb W2X5w5V+Y2W9srdjsQCIDzSyNVh7d5bqtPxMantBOUcLKwD0gQsSd35mm4q95KKWhMMP i9hZPBDSyrHIKCHl+4lI0PvjVf3YFVrDucYHfBosnet+n1goW2IPfYub1m1itd27dSFh iYr+hcqko4Bx0MExnbg13si9FzI4hbFG0lj0bs3TTRXHZ85g5ZnrRkYuL/rIR2GIPLNZ zZSnLRllfn8MDR//8Ma1J+muhQTibp+r8XVhm/qsp3YSKO+VkYaiIwZ6sPzp+u6hiB/E w9vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :in-reply-to:mime-version:references:message-id:to:from:date :delivered-to; bh=s53nBdTLridFcXfks42NZi9Oe6IUyPknoMDgXqZ5XDs=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=Q7UBC8R5xhaa5gsRBu5a3YEwN/HuyLaJrm1/U4aTsvRPwmWx+lQVEVn7ozZ1czqVcY 23vOU7IfaRI0XJ98uPcC+oxw9U7QL6RvUVML3WZ7Zs3ILIpNnAIvykgX5xIylLDum7jz rjL6Dx1Rw8kglUiLHTamm/3gFq1pOvSBv1AQYaw+4rPuZp2xfkYGN05Jz1/NXQJWy9ca ancXZSFwZxC2JNjdLAp+l6MzX/EELl4aaY6MpcbH31/994KokbmXwhNQQqXoya38MuBk a8qixBkxPpcX3QLwvBy5Sre4xl+yCqi4/3iqYUp9/v3/A+C0hP3Qx5D5Il9nQB4RJ5Vg Kh9g==; 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 4fb4d7f45d1cf-584d2e442e5si29889a12.411.2024.06.26.15.09.10; Wed, 26 Jun 2024 15:09:11 -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 47D3868D685; Thu, 27 Jun 2024 01:09:08 +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 DD7E068D3A6 for ; Thu, 27 Jun 2024 01:09:01 +0300 (EEST) Received: from 83484378655e085d94eafc45b94ceacf ([1.145.155.179]) (authenticated (0 bits)) by mx.sdf.org (8.16.1/8.14.3) with ESMTPSA id 45QM8uWf000514 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO) for ; Wed, 26 Jun 2024 22:08:59 GMT Date: Thu, 27 Jun 2024 08:08:50 +1000 From: Peter Ross To: ffmpeg-devel@ffmpeg.org Message-ID: <74b7c329c03e5931966b9f41a759e184fcdcb88c.1719439673.git.pross@xvid.org> References: <5062735ea3804e138da9ebd1d753c6bf4ec334b2.1719439673.git.pross@xvid.org> MIME-Version: 1.0 In-Reply-To: <5062735ea3804e138da9ebd1d753c6bf4ec334b2.1719439673.git.pross@xvid.org> Subject: [FFmpeg-devel] [PATCHv2 3/4] avcodec/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: bFDSq4s2H85o --- libavcodec/mmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 933d895f96..d339967702 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -161,7 +161,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;