summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-13 19:18:08 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-13 19:26:37 +0200
commitcc0380222add8df8ff9b3bd95eaf2b9d8c4c0d11 (patch)
tree1af2a0acd5fd63d9cb6c4636fbc1a3a1f36b7167 /libavcodec
parent697160366fd101898ef0caeac96234a64137eaad (diff)
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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c3
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]);