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 ESMTPS id AAADA4EAB1 for ; Mon, 12 May 2025 23:58:56 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 698C1687D40; Tue, 13 May 2025 02:58:47 +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 3FFCB687D4B for ; Tue, 13 May 2025 02:58:35 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 81BCC439EB for ; Mon, 12 May 2025 23:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1747094314; 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=g7ImuOk39uemWN0ng5ESLQs78e+HlRcvRHseZ+sbBd4=; b=a8SOalCLcuLQ/1h0sTZJst8Ohc0i2B6Z+3Aio0Zej7jNw6VU3oWmnxcdOR8/7Lxv4qzRWJ 5vobc4++lzjgKL5xiaikIT1uh7zU4GACJm3bidxapw0G8iXlq9PVHgqk2u3wgMEMfyHoJi GWdf7LGaKjjgy3NO/xPjlj+CUl00r4RyeMgqVwx4/i2M0ppooHqj5grp0ai4zB4xKImQIE Bsl8SsrCzkufzK452uC0xhiCg81XLG6oS0zzxb5pY4TjLPHp4ZltiSE4POH42Xln3ujrpt DIjxmsPqV0M5bWK3lfHHlLcCX/B9l+4QML54i5c9JNScE754pFYK1Sam/+zvNg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 13 May 2025 01:58:29 +0200 Message-ID: <20250512235832.361422-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250512235832.361422-1-michael@niedermayer.cc> References: <20250512235832.361422-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftddvieegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/4xm: Check frame_4cc before allocation 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: Timeout Fixes: 403402798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5012819292782592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/4xm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index fd3a45f0935..94f42681272 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -927,8 +927,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, frame_size = buf_size - 12; } - if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) - return ret; + if ( frame_4cc == AV_RL32("ifr2") || frame_4cc == AV_RL32("ifrm") + || frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) { + if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) + return ret; + } if (frame_4cc == AV_RL32("ifr2")) { picture->pict_type = AV_PICTURE_TYPE_I; -- 2.49.0 _______________________________________________ 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".