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 E331D44B49 for ; Sat, 21 Jun 2025 21:15:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EA1A868CB0F; Sun, 22 Jun 2025 00:15:30 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 0E33868C3C3 for ; Sun, 22 Jun 2025 00:15:23 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C3C101F433 for ; Sat, 21 Jun 2025 21:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1750540522; 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=IklmyyfCgfdLGwK//wW9q9SDnUs0gc+lR7C7JUk+a/o=; b=nr6ryg3J73hN3IeFYoQJHONtl4HZ2tQA2UJqbev/cruIFFN2tea34uFA0TExm3yOKGyok+ EiLgf29NMJUme3ODnZ5ytr16/aJKlGo5vvKBe++irH5PEwstEocmN4UQ9wjblF6aRV9wXR WJPis2mVSzKoTmKJvyL/Wxw/8Kjc9W12pc3KTCofzp7FT1r1bRjPKY85HyN8SYivvcSxZc FNhmg8QTJamRcXtOV7DtklxwNYfGyZ7FY6qSmeK97ZsTESwIkD3akO3HwGUyBIxJ77G5QN PELR/HU0t23fLTra4COnVEE0AnIkp1PXLlauqzw8uenlCpGtytNcGt5uI1XkOg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 21 Jun 2025 23:15:17 +0200 Message-ID: <20250621211521.895204-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: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdduvdeffecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepjeffueefffevvedthfeuvedtfeejteehieetffehteegvdduudevtdfffeejhfelnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/5] avformat/mov: Check that sample_count is allocated in mov_parse_heif_items() 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: 416811958/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5425269114732544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 8a094b1ea0a..6e9e3498fb5 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10336,7 +10336,7 @@ static int mov_parse_heif_items(AVFormatContext *s) st->codecpar->height = item->height; err = sanity_checks(s, sc, item->item_id); - if (err) + if (err || !sc->sample_count) return AVERROR_INVALIDDATA; sc->sample_sizes[0] = item->extent_length; -- 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".