1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-19 05:49:09 +02:00

Merge commit '605b047bcc48482dc8a356f56629da259fbddbf1'

* commit '605b047bcc48482dc8a356f56629da259fbddbf1':
  rv10: improve buffer size check.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-07 14:02:19 +01:00
commit 1c65393906

View File

@ -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;