Commit 1c653939 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '605b047b'

* commit '605b047b':
  rv10: improve buffer size check.
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents b8d6108c 605b047b
......@@ -695,11 +695,15 @@ static int rv10_decode_frame(AVCodecContext *avctx,
if(!avctx->slice_count){
slice_count = (*buf++) + 1;
buf_size--;
if (!slice_count || buf_size <= 8 * slice_count) {
av_log(avctx, AV_LOG_ERROR, "Invalid slice count: %d.\n", slice_count);
return AVERROR_INVALIDDATA;
}
slices_hdr = buf + 4;
buf += 8 * slice_count;
buf_size -= 8 * slice_count;
if (buf_size <= 0)
return AVERROR_INVALIDDATA;
}else
slice_count = avctx->slice_count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment