Commit ae0192ef authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Check extradata before access

Fixes NULL ptr dereference
Fixes Ticket5778
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b438c202
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment