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 3B5D54946B for ; Sun, 12 May 2024 00:04:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E044A68D5DD; Sun, 12 May 2024 03:03:58 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC77668D3C5 for ; Sun, 12 May 2024 03:03:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id F3AA71C0003 for ; Sun, 12 May 2024 00:03:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715472231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sJ6LCJSsbf2+Hd78OQ+D1gsIyorz1uBBMUpRo0FRBjY=; b=aW4VhYK1Ov2dW7cWGubFYT80iEIJKu8e8fdX5LUOol2MeXG4uu7CoiY0QzqRIXwvLdL2+V cJWK8RJZmN4SnVizB0CzUGlENKdQseZwcOPlwRT59/usY571r2yLnEmMH/DUxva6Odl7C5 NMZVyvu8dwPFtXBIBF9vlarkR959vy83punBF/RlX5jIApX5TVrrqxTUw1S2gXPplRNMtH RnfAVVITB0d91T+s27kDwWJfPhDQ0j0H6GuWqfXbb2cFjEnPdjZOtZ6PNramQ0GTq1SlaV Eu74mTq0tvM6vyieLioEarUopHDZMQAwpH3cQoddSar9vESE6dct8pz1ySApyw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 12 May 2024 02:03:46 +0200 Message-ID: <20240512000349.3381912-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240512000349.3381912-1-michael@niedermayer.cc> References: <20240512000349.3381912-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/mpeg12dec: Use 64bit in bit computation 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 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: I dont think this can actually overflow but 64bit seems reasonable to use Fixes: CID1521983 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/mpeg12dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 21a214ef5b7..e257889d034 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2734,7 +2734,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, int ret; // Check for minimal intra MB size (considering mb header, luma & chroma dc VLC, ac EOB VLC) - if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2 + 3*4 + 2*2 + 2*6)) + if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2LL + 3*4 + 2*2 + 2*6)) return AVERROR_INVALIDDATA; ret = ff_get_buffer(avctx, frame, 0); -- 2.43.2 _______________________________________________ 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".