diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-14 00:07:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-14 00:31:57 +0200 |
commit | 4bde1a4a374e0cc939bbdd8260dad77432ca03c1 (patch) | |
tree | c67616919ab5f9be4cf7a2a671764b7c249cfba6 | |
parent | 503ec7139f887bf8ed8d57da07ce93c4e88447a6 (diff) | |
download | ffmpeg-4bde1a4a374e0cc939bbdd8260dad77432ca03c1.tar.gz |
avcodec/mpegvideo: Fix null pointer dereference of picture array
Fixes: 0d0a2bace067d09c08f0fa5340496c23_signal_sigsegv_7ffff713351a_342_WobblyWindowsIntro.avi with memlimit of 67108864
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 870d790749..26930fc3e1 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -524,7 +524,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, if(s->picture) for (i = 0; i < MAX_PICTURE_COUNT; i++) { ff_mpeg_unref_picture(s->avctx, &s->picture[i]); - if (s1->picture[i].f->buf[0] && + if (s1->picture && s1->picture[i].f->buf[0] && (ret = ff_mpeg_ref_picture(s->avctx, &s->picture[i], &s1->picture[i])) < 0) return ret; } |