diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-04 04:17:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-04 04:17:15 +0100 |
commit | d08c6e1101aa3f59d819f5c4aeef2d298e1b785c (patch) | |
tree | d78f567c6a86a863fd57f0e9feed41d0acbeb88f /libavcodec/rv30.c | |
parent | a881b9aa08af79b4fb15b912842e203a732fa9af (diff) | |
download | ffmpeg-d08c6e1101aa3f59d819f5c4aeef2d298e1b785c.tar.gz |
avcodec/rv30: check rpr before use against maximum
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv30.c')
-rw-r--r-- | libavcodec/rv30.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index 6c65afb83f..901ba89618 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -52,6 +52,11 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn si->pts = get_bits(gb, 13); rpr = get_bits(gb, av_log2(r->max_rpr) + 1); if(rpr){ + if (rpr > r->max_rpr) { + av_log(avctx, AV_LOG_ERROR, "rpr too large\n"); + return AVERROR_INVALIDDATA; + } + if (avctx->extradata_size < rpr * 2 + 8) { av_log(avctx, AV_LOG_ERROR, "Insufficient extradata - need at least %d bytes, got %d\n", |