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 95704499A3 for ; Tue, 26 Mar 2024 02:31:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 742DD68D5F1; Tue, 26 Mar 2024 04:31:08 +0200 (EET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 36E7C68D5D5 for ; Tue, 26 Mar 2024 04:31:00 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7CEDC240002 for ; Tue, 26 Mar 2024 02:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1711420259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=ja6bAIf39RPDOmgh6aLOhTfkyJwwQ708dtO1oVbAlVs=; b=K81R10TrXLYPX4PZM95jswGh27/EV8kkVLoXfWx7LaA/QNFFeO0fZwlHNZrxkK7Lnh+aTL hEHzyp5nfUhJE6HykROEYNZerGfG8+1YNmCSwPvteOQxTlk9wxWbHLl8OOoMz8//Tqb7kM XOXRteXOOfDciBLWAowIC0GVyLQDh1df28N2neE1a0HIMFTnLLb+gkQRpvj9/IpxS73HiZ 9Z/geFffZLenI4B1cE3wKWImtD6dWc2026jdS+IMzEdNVehldnrEFmpUGQEXMlwMmF2DVb En2yYtY4fbFBPx8LnrATKD7NyY++vWz+QwVIfvYeFmU48ksPjmazJH1J7lu37g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 26 Mar 2024 03:30:52 +0100 Message-Id: <20240326023056.20548-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240326023056.20548-1-michael@niedermayer.cc> References: <20240326023056.20548-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/7] avcodec/qoadec: Fix undefined overflow in lms_predict 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: -1575944192 + -602931200 cannot be represented in type 'int' Fixes: 62285/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QOA_fuzzer-6470469339185152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/qoadec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qoadec.c b/libavcodec/qoadec.c index 75099d1199f..c5cf351f9c1 100644 --- a/libavcodec/qoadec.c +++ b/libavcodec/qoadec.c @@ -67,7 +67,7 @@ static int qoa_lms_predict(QOAChannel *lms) { int prediction = 0; for (int i = 0; i < QOA_LMS_LEN; i++) - prediction += lms->weights[i] * lms->history[i]; + prediction += (unsigned)lms->weights[i] * lms->history[i]; return prediction >> 13; } -- 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".