diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 19:30:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-22 19:31:39 +0100 |
commit | e4eb2c957b68df097db700082af2320d31e5b340 (patch) | |
tree | 73670e473cf4e2b345f62034d12bfca102725939 /libavcodec/rv10.c | |
parent | 9c00f9ada690ff0446cb6299549964ff9436050b (diff) | |
download | ffmpeg-e4eb2c957b68df097db700082af2320d31e5b340.tar.gz |
avcodec/rv10: revert hunk from ce9f5b13ed1eb1882479574c12af24cf0e2b8aaf
Fixes segfault
Fixes: signal_sigsegv_103f872_2759_RVTR_behere_ivideo_motor_cross_interview_final_56kbps.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r-- | libavcodec/rv10.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 120a6d99a7..4d48a49f3c 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -364,6 +364,8 @@ static int rv20_decode_picture_header(RVDecContext *rv) AVRational old_aspect = s->avctx->sample_aspect_ratio; av_log(s->avctx, AV_LOG_DEBUG, "attempting to change resolution to %dx%d\n", new_w, new_h); + if (av_image_check_size(new_w, new_h, 0, s->avctx) < 0) + return AVERROR_INVALIDDATA; ff_MPV_common_end(s); // attempt to keep aspect during typical resolution switches |