diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 03:46:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-16 05:16:34 +0100 |
commit | 68def00a6330e46eea2ee6735fa4ae91317e8f5c (patch) | |
tree | 5e843f3dbbb7447e6dd5ddb512f0e0deec4e51a1 /libavcodec/rv34.c | |
parent | 7845f8d282a98d5e01aaeddfa9af698697d8874d (diff) | |
download | ffmpeg-68def00a6330e46eea2ee6735fa4ae91317e8f5c.tar.gz |
rv34: check image size before using it
fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 4226ecb1f8..6527252567 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -24,6 +24,7 @@ * RV30/40 decoder common data */ +#include "libavutil/imgutils.h" #include "libavutil/internal.h" #include "avcodec.h" @@ -1661,6 +1662,9 @@ int ff_rv34_decode_frame(AVCodecContext *avctx, av_log(s->avctx, AV_LOG_WARNING, "Changing dimensions to %dx%d\n", si.width, si.height); + if (av_image_check_size(si.width, si.height, 0, s->avctx)) + return AVERROR_INVALIDDATA; + s->width = si.width; s->height = si.height; avcodec_set_dimensions(s->avctx, s->width, s->height); |