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 D2B574BFCE for ; Sat, 20 Jul 2024 00:53:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 546C068DA93; Sat, 20 Jul 2024 03:52:58 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C7A2368D9A4 for ; Sat, 20 Jul 2024 03:52:52 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B4CAD60006 for ; Sat, 20 Jul 2024 00:52:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1721436771; 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=5kUE4xTU5Eswhu5OK4MTn7vbU6BdZDpQOyHgF6oRfGU=; b=pVvISwpNn7zIHOHjw4Pn8n7JQmEdCN62YUKYiiWfXkJ4ntN9Wj4ebhvc6FYvNQXQT6rOOT bpaSYERakyiYbAiyfzrRFGJjGNABDVH/zg2ixYnldniLcBbVSxiMeb8sKxGsyif2WkmRx+ 9+/YWpTnm/dme+j4LD0GMh78+H7wGpnxjfpAGdPKbkq5OC/KaFP6Qcuj5AWEPxjTvV3rJg 81gkyPxr2cPzXg2VZw7b4JFMbiQUDjLWjH4AC+LZ+a9VCdib0eYqh1+psJZGof4OHzlhPQ p4pr+Ksr4CES61REDqrpEd2NR6Vfo4IZGoVucjbGsa/VVM8HXUVc/DNak+afUw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 20 Jul 2024 02:52:41 +0200 Message-ID: <20240720005241.726089-11-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240720005241.726089-1-michael@niedermayer.cc> References: <20240720005241.726089-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 11/11] avcodec/hdrenc: Allocate more space 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: This needs to be double checked or a checking way of writing should be used Fixes: out of array access Fixes: 70007/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HDR_fuzzer-5478704150020096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hdrenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hdrenc.c b/libavcodec/hdrenc.c index 20e42134bc8..a7bf36946db 100644 --- a/libavcodec/hdrenc.c +++ b/libavcodec/hdrenc.c @@ -124,7 +124,7 @@ static int hdr_encode_frame(AVCodecContext *avctx, AVPacket *pkt, uint8_t *buf; int ret; - packet_size = avctx->width * avctx->height * 4LL + 1024LL; + packet_size = avctx->height * 4LL + avctx->width * avctx->height * 8LL + 1024LL; if ((ret = ff_get_encode_buffer(avctx, pkt, packet_size, 0)) < 0) return ret; -- 2.45.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".