aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorDaniel Kang <daniel.d.kang@gmail.com>2011-01-10 10:47:10 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2011-01-10 10:47:10 +0000
commit2843502ea424a095b39bce7577de90730fb2a0c6 (patch)
tree9c40c4d69ef43318e9087d70d203125e0999b800 /libavcodec
parent8e37a1deb30c51e2e2ef5726f550b698303bc029 (diff)
downloadffmpeg-2843502ea424a095b39bce7577de90730fb2a0c6.tar.gz
Check for invalid decode op-codes, fixes issue 2522.
Patch by Daniel Kang, daniel.d.kang at gmail Originally committed as revision 26295 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/interplayvideo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index b98386f77c..34f055743d 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -99,6 +99,10 @@ static int copy_from(IpvideoContext *s, AVFrame *src, int delta_x, int delta_y)
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;