1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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
This commit is contained in:
Daniel Kang 2011-01-10 10:47:10 +00:00 committed by Carl Eugen Hoyos
parent 8e37a1deb3
commit 2843502ea4

View File

@ -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;