[FFmpeg-cvslog] r26295 - trunk/libavcodec/interplayvideo.c

cehoyos subversion
Mon Jan 10 11:47:10 CET 2011


Author: cehoyos
Date: Mon Jan 10 11:47:10 2011
New Revision: 26295

Log:
Check for invalid decode op-codes, fixes issue 2522.

Patch by Daniel Kang, daniel.d.kang at gmail

Modified:
   trunk/libavcodec/interplayvideo.c

Modified: trunk/libavcodec/interplayvideo.c
==============================================================================
--- trunk/libavcodec/interplayvideo.c	Mon Jan 10 11:36:14 2011	(r26294)
+++ trunk/libavcodec/interplayvideo.c	Mon Jan 10 11:47:10 2011	(r26295)
@@ -99,6 +99,10 @@ static int copy_from(IpvideoContext *s, 
             motion_offset, s->upper_motion_limit_offset);
         return -1;
     }
+    if (src->data[0] == NULL) {
+        av_log(s->avctx, AV_LOG_ERROR, "Invalid decode type, corrupted header?\n");
+        return AVERROR(EINVAL);
+    }
     s->dsp.put_pixels_tab[!s->is_16bpp][0](s->pixel_ptr, src->data[0] + motion_offset,
                                            s->current_frame.linesize[0], 8);
     return 0;



More information about the ffmpeg-cvslog mailing list