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 90B6D40DFE for ; Tue, 8 Feb 2022 15:01:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1308768B104; Tue, 8 Feb 2022 17:01:29 +0200 (EET) Received: from vie01a-dmta-pe03-1.mx.upcmail.net (vie01a-dmta-pe03-1.mx.upcmail.net [62.179.121.160]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A76D68AFA4 for ; Tue, 8 Feb 2022 17:01:23 +0200 (EET) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1nHRso-00GezG-0J for ffmpeg-devel@ffmpeg.org; Tue, 08 Feb 2022 15:54:18 +0100 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id HRrqn1tD0SgGFHRrqnHYTW; Tue, 08 Feb 2022 15:53:18 +0100 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=f8Q2+96M c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=NEAV23lmAAAA:8 a=fwD9BNtiQAMDJSK6jCwA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 8 Feb 2022 15:53:18 +0100 Message-Id: <20220208145318.26969-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220208145318.26969-1-michael@niedermayer.cc> References: <20220208145318.26969-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfACWPegicSQoqXgT9+wO6/qw/Bz/GSed+ys2H7+j8KL3qESg8x1kYi4ZiP6FKgWv5G2wERo7tuEkROBRid7uOrbEcG5z1zt8keqW4lH+QTpebkXVlE2O R5EKviEl5pZBtqlAv0DYUxffETxtt8RYdc00CtCt59higTMajF3ehA/7 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/sonic: Use unsigned for predictor_k to avoid undefined behavior 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: -1094995529 * 24 cannot be represented in type 'int' Fixes: 44436/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-4874459459223552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c index cf1cfb1460..0d539e8879 100644 --- a/libavcodec/sonic.c +++ b/libavcodec/sonic.c @@ -1004,7 +1004,7 @@ static int sonic_decode_frame(AVCodecContext *avctx, // dequantize for (i = 0; i < s->num_taps; i++) - s->predictor_k[i] *= s->tap_quant[i]; + s->predictor_k[i] *= (unsigned) s->tap_quant[i]; if (s->lossless) quant = 1; -- 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".