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 2aa63784b5)
This commit is contained in:
parent
a83c1a3db9
commit
d517a84c85
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue