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 463714A278 for ; Sat, 27 Apr 2024 18:51:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3722268D281; Sat, 27 Apr 2024 21:51:53 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A88A368CF12 for ; Sat, 27 Apr 2024 21:51:46 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0D695C0003 for ; Sat, 27 Apr 2024 18:51:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714243906; 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=n7pLM5hNQGGah53k+tn+FNMEQqOof6xiLspXrrY0luY=; b=Gy1yhqcHo/dcYX28PQaMHE6Ge3900Eas7UCLkqq+Rckha4zTfll+wUI7ifCwgpzWQZaToX 3cNCWH+fOylNwvSW0eKZYy1PgWScWA6lSsJKI2Iag1q5dt4MxiYRSHmKOVV31YrY5HoGGN WDCacn4QYQupKw5gZnS0+r6RaRyWUhiCpOBZJVbY0Mw0ypj/NRH6rr+/twZubj8nlbeyRU tllwB8itY45ksNK+3Veu5bPeDWrCWSrvAHrthzDSnQQLNBxoAo5+KXnkZwFNl/fI3jMoiQ +6iXaDPspsTPb6OX0OPaDWTHnVhdezGctrgFLHzglZ9+FTPEMQQUoBAa2FOlLQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 27 Apr 2024 20:51:45 +0200 Message-ID: <20240427185145.1458898-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH] avformat/iamfdec: check nb_streams in header read 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: Assertion pkt->stream_index < (unsigned)s->nb_streams && "Invalid stream index.\n" failed at libavformat/demux.c:572 Fixes: 67890/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-5166340789829632.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iamfdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/iamfdec.c b/libavformat/iamfdec.c index e34d13e74c5..ce6d4aa0647 100644 --- a/libavformat/iamfdec.c +++ b/libavformat/iamfdec.c @@ -154,6 +154,9 @@ static int iamf_read_header(AVFormatContext *s) } } + if (!s->nb_streams) + return AVERROR_INVALIDDATA; + return 0; } -- 2.43.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".