diff options
author | Daniel Kang <daniel.d.kang@gmail.com> | 2011-01-10 10:28:06 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2011-01-10 10:28:06 +0000 |
commit | 43c34675afee8ced294ecc436f58587e8e8e913b (patch) | |
tree | 33fa8eeb452784df1503c11bec94472d01222928 /libavcodec/roqvideo.c | |
parent | ebc3488300523dad3da41f420ecfcdddd1d8e9f3 (diff) | |
download | ffmpeg-43c34675afee8ced294ecc436f58587e8e8e913b.tar.gz |
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
Diffstat (limited to 'libavcodec/roqvideo.c')
-rw-r--r-- | libavcodec/roqvideo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/roqvideo.c b/libavcodec/roqvideo.c index 830eb7b329..eb8fc253ad 100644 --- a/libavcodec/roqvideo.c +++ b/libavcodec/roqvideo.c @@ -115,6 +115,11 @@ static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax 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++) { int outstride = ri->current_frame->linesize[cp]; int instride = ri->last_frame ->linesize[cp]; |