From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id B6B104CD03 for ; Sat, 9 Aug 2025 12:22:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 2C5E368CFA8; Sat, 9 Aug 2025 15:22:04 +0300 (EEST) Received: from 0f9ae49ae7c8 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id DEF8668CF05 for ; Sat, 9 Aug 2025 15:22:01 +0300 (EEST) MIME-Version: 1.0 From: michaelni To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] =?utf-8?q?=5BPATCH=5D_avcodec/exr=3A_Check_for_pi?= =?utf-8?q?xel_type_consistency_in_DWA_=28PR_=2320194=29?= 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" Message-Id: <20250809122204.2C5E368CFA8@ffbox0-bg.ffmpeg.org> Date: Sat, 9 Aug 2025 15:22:04 +0300 (EEST) Archived-At: List-Archive: List-Post: PR #20194 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20194 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20194.patch Fixes: out of array access Fixes: BIGSLEEP-436511754/testcase.exr Found-by: Google Big Sleep Signed-off-by: Michael Niedermayer >From 3008d30f9885fc22b1cba63d8770820872c49fc9 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 9 Aug 2025 14:05:19 +0200 Subject: [PATCH] avcodec/exr: Check for pixel type consistency in DWA Fixes: out of array access Fixes: BIGSLEEP-436511754/testcase.exr Found-by: Google Big Sleep Signed-off-by: Michael Niedermayer --- libavcodec/exr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index dea612a42b..67f971ff35 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -2086,6 +2086,17 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, if ((ret = decode_header(s, picture)) < 0) return ret; + if (s->compression == EXR_DWAA || + s->compression == EXR_DWAB) { + for (int i = 0; inb_channels; i++) { + EXRChannel *channel = &s->channels[i]; + if (channel->pixel_type != s->pixel_type) { + avpriv_request_sample(s->avctx, "mixed pixel type DWA"); + return AVERROR_PATCHWELCOME; + } + } + } + switch (s->pixel_type) { case EXR_HALF: if (s->channel_offsets[3] >= 0) { -- 2.49.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".