mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/mov: check that sample and chunk count is 1 for HEIF
Fixes NULL pointer dereference in broken/fuzzed streams. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 2aa63784b533f461785c3e767e354e84c7e2c8c2)
This commit is contained in:
parent
a83c1a3db9
commit
d517a84c85
@ -9574,6 +9574,9 @@ 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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user