Commit 2843502e authored by Daniel Kang's avatar Daniel Kang Committed by Carl Eugen Hoyos

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
parent 8e37a1de
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment