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 F236048A64 for ; Fri, 26 Jul 2024 21:08:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AE51B68D634; Sat, 27 Jul 2024 00:08:40 +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 DCAAE68D2AC for ; Sat, 27 Jul 2024 00:08:33 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 11A7260002 for ; Fri, 26 Jul 2024 21:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1722028113; 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=VA7L1h1N5CFK2nSHFrUXJ7Ej/boznxJ2N90W4v1E45Y=; b=kD1qFt5Ej3In7naSSfmseHMQh7RyrL/PoCdApUk6y+AT1HNmdRiHDr6x3qYbACRGPp7+xu FrdQcM3DOl4XJI0MR4qVQPswwFPRI8/0V31H1rVqYn3K/z+RD1ecoqA0vN9AKCIvNT15f6 m1kJEznI5ms6lEL6cuQ2nex4nWI0TXwFWNggDLTSE/AWLv/NpFCLXk3f5E6vUx/ZCX8pWi 6ayW0MzRhDA3g40zXlFAoSmOjquqdrrL6z4FwsTYwY+bdyEskxaHZrfmLlo99266m/3xRX okCjDSGPiRvzUfd+IOtJhbgN/ibs8zuA9ViDGFYyfEuNnBLtg78twJqlxRVYZA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 26 Jul 2024 23:08:30 +0200 Message-ID: <20240726210832.288597-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/3] avformat/mov: Check sample_sizes before using it 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: NULL pointer dereference Fixes: 70569/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5247918563459072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index b74e43e2140..63db7d59a58 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10060,6 +10060,10 @@ static int mov_read_header(AVFormatContext *s) st = item->st; sc = st->priv_data; + + if (!sc->sample_sizes || !sc->sample_count) + return AVERROR_INVALIDDATA; + st->codecpar->width = item->width; st->codecpar->height = item->height; -- 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".