diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-13 19:18:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-13 19:26:37 +0200 |
commit | cc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11 (patch) | |
tree | 1af2a0acd5fd63d9cb6c4636fbc1a3a1f36b7167 | |
parent | 697160366fd101898ef0caeac96234a64137eaad (diff) | |
download | ffmpeg-cc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11.tar.gz |
avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()
Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpegvideo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 637b5695a5..870d790749 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1107,6 +1107,9 @@ void ff_mpv_common_end(MpegEncContext *s) { int i; + if (!s) + return ; + if (s->slice_context_count > 1) { for (i = 0; i < s->slice_context_count; i++) { free_duplicate_context(s->thread_context[i]); |