1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avformat/mov: Check extradata before access

Fixes NULL ptr dereference
Fixes Ticket5778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-08-16 18:07:11 +02:00
parent b438c2025c
commit ae0192ef5f

View File

@ -4830,8 +4830,9 @@ static int mov_read_close(AVFormatContext *s)
av_freep(&sc->rap_group);
av_freep(&sc->display_matrix);
for (j = 0; j < sc->stsd_count; j++)
av_free(sc->extradata[j]);
if (sc->extradata)
for (j = 0; j < sc->stsd_count; j++)
av_free(sc->extradata[j]);
av_freep(&sc->extradata);
av_freep(&sc->extradata_size);