Commit 84490b74 authored by Vitor Sessak's avatar Vitor Sessak

Handle the case where we do not have enough input

Originally committed as revision 13282 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 9d2e6e84
......@@ -343,9 +343,11 @@ static int ra144_decode_frame(AVCodecContext * avctx,
Real144_internal *glob = avctx->priv_data;
GetBitContext gb;
if(buf_size == 0)
return 0;
if(buf_size < 20) {
av_log(avctx, AV_LOG_ERROR,
"Frame too small (%d bytes). Truncated file?\n", buf_size);
return buf_size;
}
init_get_bits(&gb, buf, 20 * 8);
for (i=0; i<10; i++)
......
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