Commit 1e1448f5 authored by kostya's avatar kostya

Check RV30/40 slice offsets to be inside buffer.

This fixes issue 738


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15981 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0d6c3fcb
......@@ -1389,6 +1389,11 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
else
size= get_slice_offset(avctx, slices_hdr, i+1) - offset;
if(offset > buf_size){
av_log(avctx, AV_LOG_ERROR, "Slice offset is greater than frame size\n");
break;
}
r->si.end = s->mb_width * s->mb_height;
if(i+1 < slice_count){
init_get_bits(&s->gb, buf+get_slice_offset(avctx, slices_hdr, i+1), (buf_size-get_slice_offset(avctx, slices_hdr, i+1))*8);
......
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