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 A4DA741A2B for ; Sat, 17 Sep 2022 21:17:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D642668BBEB; Sun, 18 Sep 2022 00:16:13 +0300 (EEST) Received: from vie01a-dmta-at01-2.mx.upcmail.net (vie01a-dmta-at01-2.mx.upcmail.net [62.179.121.146]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00D0468BB5A for ; Sun, 18 Sep 2022 00:16:00 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oZfAO-00GP6r-HF for ffmpeg-devel@ffmpeg.org; Sat, 17 Sep 2022 23:16:00 +0200 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Zf9moPPmk8s8UZfAOoEt8O; Sat, 17 Sep 2022 23:16:00 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id ZfAOoibLROG5ZZfAOom24V; Sat, 17 Sep 2022 23:16:00 +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=KJo5sHJo c=1 sm=1 tr=0 ts=63263910 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=c5QjGmhTwOig4Jn9F5gA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 17 Sep 2022 23:15:57 +0200 Message-Id: <20220917211557.11547-9-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220917211557.11547-1-michael@niedermayer.cc> References: <20220917211557.11547-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfP7EFXbA4RImoSaLqAEXsIfCQQWF1iv1q3/3CzxnAESKXU1qaD7Zz26MjdpyfXW+Q+0ZdaQI6rEcZD3MHrBBCzJigvpKyM9qUgb7cQoSZ6MdB9+C6t31 Q96ZaI1NgZ5SeZN4TiT25daFGVT3ihJA8cBV5GllxyDHmNHYY0QoFsO+EXq7FmsqMAgyBZrF32pumg== Subject: [FFmpeg-devel] [PATCH 9/9] avformat/jacosubdec: Fix overflow in get_shift() 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: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-6722544461283328 Fixes: signed integer overflow: 48214448 * 60 cannot be represented in type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/jacosubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 0ee4820f62a..61b1316dc9b 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -144,7 +144,7 @@ static int get_shift(int timeres, const char *buf) ret = 0; switch (n) { case 4: - ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d); + ret = sign * (((int64_t)a*3600 + (int64_t)b*60 + c) * timeres + d); break; case 3: ret = sign * (( (int64_t)a*60 + b) * timeres + c); -- 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".