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 37C2B4803C for ; Fri, 20 Jun 2025 00:33:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id CFC9D68DAC1; Fri, 20 Jun 2025 03:33:03 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6830468D08B for ; Fri, 20 Jun 2025 03:32:57 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C966543905 for ; Fri, 20 Jun 2025 00:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750379576; 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; bh=4yRbyBllLsRsKCm8+xWI0IjnKr5EQjTyumvVTx33Mw0=; b=Cl76Pzh3UmqReHcHtO7/z8/V87LSYhlAdk6lSCq0z8s5sD86k+E57pbOu1U7oUwNIx21u3 DV+DGzkWxw398PtMGkno+Sgydd2hNYUaZUpRaq2YZVNJVntJ+Dg/ms5E9z8SueT1kBUs2R jeX88gL1H/nYV08l6jxizLW4DTX/4XrajN1qxLpelUH39B7zHaVS3IJH8IWAunWmH83qbg Cb+yTIHJWBJbICW3v3RSeutOuVFTRl/DfrsYObGHhwWb2UPnNo+jI62j5sC8v9S/NSyG7y SG/11akrrQNGIJYCtcK1dQKPO6/ckJskqD+HgbwseMy2uuIFpA3+Z31Av+L6Sg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 20 Jun 2025 02:32:48 +0200 Message-ID: <20250620003255.295598-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdeileeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeejffeufeffveevtdfhueevtdefjeetheeiteffheetgedvudduvedtffefjefhleenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/8] avcodec/psd: Move frame allocation after RLE processing 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: 410609448/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PSD_fuzzer-6267226128973824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/psd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/psd.c b/libavcodec/psd.c index 9c3e4f69052..f0b90ec1bd7 100644 --- a/libavcodec/psd.c +++ b/libavcodec/psd.c @@ -418,9 +418,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, s->uncompressed_size = s->line_size * s->height * s->channel_count; - if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) - return ret; - /* decode picture if need */ if (s->compression == PSD_RLE) { s->tmp = av_malloc(s->uncompressed_size); @@ -443,6 +440,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, ptr_data = s->gb.buffer; } + if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) + return ret; + /* Store data */ if ((avctx->pix_fmt == AV_PIX_FMT_YA8)||(avctx->pix_fmt == AV_PIX_FMT_YA16BE)){/* Interleaved */ ptr = picture->data[0]; -- 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".