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 39C7F490ED for ; Fri, 3 May 2024 21:55:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C370768D72F; Sat, 4 May 2024 00:55:16 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6200768D71C for ; Sat, 4 May 2024 00:55:09 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2CF3420003 for ; Fri, 3 May 2024 21:55:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714773308; 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=xb2Y/kNRKgPB1pSf6dE7oWOvtq1UeUMXLgzzOvqM4hA=; b=dloY1VP/SV4goQh1PkaOeYZPhtoI/nt4b2pqU4uz1T5Jbc22eD+Bl4oHNx7eqOLKq/S6pT bUbQgBYQRLaR4B0Ms9GmbgEezGDxkJTmKKO0AOL7plZJxnD4L2HOI40RCMbtnziTWHZDZ/ KrevpjI/LFHGjjBq+w+D1Nw/0yGLf/j5ek/8ROcoJ/b+vkKF9fBPeYeT9mc2BkrdIPuM4o RsIIiWknzsq6HSKSUsFt1Y0VNnSf9rLXKYg2HUpnz6lG5A7SlDsVhvD3r24WaY0CgYB8nF w7qbJrxaqzv2YNbeSODus1JU9Jwb6AiVrwWgpJcjeAR844PREA9067nCAN+BXA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 3 May 2024 23:55:02 +0200 Message-ID: <20240503215502.1509887-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240503215502.1509887-1-michael@niedermayer.cc> References: <20240503215502.1509887-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/exr: Fix preview overflow 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: Fixes: CID1515456 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/exr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 8bd39f78a45..4bac0be89b2 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1943,7 +1943,7 @@ static int decode_header(EXRContext *s, AVFrame *frame) "preview", 16)) >= 0) { uint32_t pw = bytestream2_get_le32(gb); uint32_t ph = bytestream2_get_le32(gb); - uint64_t psize = pw * ph; + uint64_t psize = pw * (uint64_t)ph; if (psize > INT64_MAX / 4) { ret = AVERROR_INVALIDDATA; goto fail; -- 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".