1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Check for invalid motion vector, fixes issue 2521.

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

Originally committed as revision 26293 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Daniel Kang 2011-01-10 10:28:06 +00:00 committed by Carl Eugen Hoyos
parent ebc3488300
commit 43c34675af

View File

@ -115,6 +115,11 @@ static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax
return; return;
} }
if (ri->last_frame->data[0] == NULL) {
av_log(ri->avctx, AV_LOG_ERROR, "Invalid decode type. Invalid header?\n");
return;
}
for(cp = 0; cp < 3; cp++) { for(cp = 0; cp < 3; cp++) {
int outstride = ri->current_frame->linesize[cp]; int outstride = ri->current_frame->linesize[cp];
int instride = ri->last_frame ->linesize[cp]; int instride = ri->last_frame ->linesize[cp];