mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-11 09:07:29 +00:00
Handle the case where we do not have enough input
Originally committed as revision 13282 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9d2e6e84ce
commit
84490b744e
@ -343,9 +343,11 @@ static int ra144_decode_frame(AVCodecContext * avctx,
|
|||||||
Real144_internal *glob = avctx->priv_data;
|
Real144_internal *glob = avctx->priv_data;
|
||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
|
|
||||||
if(buf_size == 0)
|
if(buf_size < 20) {
|
||||||
return 0;
|
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);
|
init_get_bits(&gb, buf, 20 * 8);
|
||||||
|
|
||||||
for (i=0; i<10; i++)
|
for (i=0; i<10; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user