Re: [FFmpeg-devel] [PATCH] avformat/iamfdec: check nb_streams in header read
On Sat, Apr 27, 2024 at 08:58:22PM -0300, James Almer wrote: > On 4/27/2024 3:51 PM, Michael Niedermayer wrote: > > 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; > > } > > Should be ok. will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "Nothing to hide" only works if the folks in power share the values of you and everyone you know entirely and always will -- Tom Scott signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/iamfdec: check nb_streams in header read
On 4/27/2024 3:51 PM, Michael Niedermayer wrote: 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; } Should be ok. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/iamfdec: check nb_streams in header read
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-requ...@ffmpeg.org with subject "unsubscribe".