[FFmpeg-cvslog] avcodec/mpegvideo: Fix null pointer dereference of picture array
Michael Niedermayer
git at videolan.org
Tue Jul 14 00:52:57 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Jul 14 00:07:53 2015 +0200| [4bde1a4a374e0cc939bbdd8260dad77432ca03c1] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4bde1a4a374e0cc939bbdd8260dad77432ca03c1
---
libavcodec/mpegvideo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 870d790..26930fc 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;
}
More information about the ffmpeg-cvslog
mailing list