[FFmpeg-cvslog] avformat/mov: Check extradata before access
Michael Niedermayer
git at videolan.org
Tue Aug 16 20:51:04 EEST 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Aug 16 18:07:11 2016 +0200| [ae0192ef5fe8ca67b6532a57f829f744db3facb9] | committer: Michael Niedermayer
avformat/mov: Check extradata before access
Fixes NULL ptr dereference
Fixes Ticket5778
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae0192ef5fe8ca67b6532a57f829f744db3facb9
---
libavformat/mov.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f4c35d7..134953e 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);
More information about the ffmpeg-cvslog
mailing list