From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F091C43449 for ; Mon, 13 Jun 2022 00:10:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2831668B528; Mon, 13 Jun 2022 03:10:31 +0300 (EEST) Received: from vie01a-dmta-at02-3.mx.upcmail.net (vie01a-dmta-at02-3.mx.upcmail.net [62.179.121.150]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D3A9B68B3B1 for ; Mon, 13 Jun 2022 03:10:23 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at02.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1o0Xew-0001Ut-Rl for ffmpeg-devel@ffmpeg.org; Mon, 13 Jun 2022 02:10:22 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id 0XbwoecXL8s8U0XewoKLtF; Mon, 13 Jun 2022 02:10:22 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id 0XewozJAI8eSW0XewoM9qO; Mon, 13 Jun 2022 02:10:22 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62a6806e a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=KBDumcJZRJ8iyMBVdhoA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 13 Jun 2022 02:10:21 +0200 Message-Id: <20220613001021.8065-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220613001021.8065-1-michael@niedermayer.cc> References: <20220613001021.8065-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfAGOLauaHOVCWEZeXR0itTFeiGA9lfMu4HpSMGhUF6lR1vapXXNXrNTq7ke2VYuihNKkBCefIi1lZNh09K7VXctf6QM9LOauBV3FHuIvhDUrCxa/sHQ5 /32jr6OfjaXeP35Kv4f6A1kV6D5QDq86zDfolg0bv+nvSPVLGRxHeuK9bH4PcIS160C0IE9enOuw8w== Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/bink: disallow odd positioned scaled blocks 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: out of array access Fixes: 47911/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-6194020855971840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/bink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/bink.c b/libavcodec/bink.c index ce740ad275..ed4406d97d 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -1088,7 +1088,7 @@ static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb, for (bx = 0; bx < bw; bx++, dst += 8, prev += 8) { blk = get_value(c, BINK_SRC_BLOCK_TYPES); // 16x16 block type on odd line means part of the already decoded block, so skip it - if ((by & 1) && blk == SCALED_BLOCK) { + if (((by & 1) || (bx & 1)) && blk == SCALED_BLOCK) { bx++; dst += 8; prev += 8; -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".