aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-08-16 18:07:11 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-16 19:47:23 +0200
commitae0192ef5fe8ca67b6532a57f829f744db3facb9 (patch)
tree6200abf94f224067148b673f3c40702cda71dcbc /libavformat
parentb438c2025c3e277bb506a3a7b8ec8a0d52ed3b07 (diff)
downloadffmpeg-ae0192ef5fe8ca67b6532a57f829f744db3facb9.tar.gz
avformat/mov: Check extradata before access
Fixes NULL ptr dereference Fixes Ticket5778 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f4c35d7d2e..134953efd9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);