Fixes NULL pointer dereference in broken/fuzzed streams.
Signed-off-by: James Almer <[email protected]>
---
libavformat/mov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 14f43bf906..ba5f85e7e3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -9904,6 +9904,8 @@ static int mov_read_header(AVFormatContext *s)
st->codecpar->width = item->width;
st->codecpar->height = item->height;
+ if (sc->sample_count != 1 || sc->chunk_count != 1)
+ return AVERROR_INVALIDDATA;
sc->sample_sizes[0] = item->extent_length;
sc->chunk_offsets[0] = item->extent_offset + offset;
--
2.45.2
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".