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 A29EE44CC5 for ; Sun, 16 Apr 2023 16:50:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 26D4168BE6F; Sun, 16 Apr 2023 19:48:57 +0300 (EEST) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B7EF068BBDD for ; Sun, 16 Apr 2023 19:48:55 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id B584C100006 for ; Sun, 16 Apr 2023 16:48:54 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 16 Apr 2023 18:48:29 +0200 Message-Id: <20230416164830.15664-10-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230416164830.15664-1-michael@niedermayer.cc> References: <20230416164830.15664-1-michael@niedermayer.cc> Subject: [FFmpeg-devel] [PATCH 10/11] avcodec/dpcm: fix undefined interger overflow in wady 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: signed integer overflow: -2147375930 + -133875 cannot be represented in type 'int' Fixes: 45982/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WADY_DPCM_fuzzer-6703727013920768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/dpcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index 6ea9e2c0650..eff6587404d 100644 --- a/libavcodec/dpcm.c +++ b/libavcodec/dpcm.c @@ -444,7 +444,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (n & 0x80) s->sample[idx] = sign_extend((n & 0x7f) << 9, 16); else - s->sample[idx] += s->scale * wady_table[n & 0x7f]; + s->sample[idx] += s->scale * (unsigned)wady_table[n & 0x7f]; *output_samples++ = av_clip_int16(s->sample[idx]); idx ^= stereo; } -- 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".