diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 16:20:37 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 16:20:37 +0000 |
commit | 84490b744e2f5dc485474562169d12b79eee9634 (patch) | |
tree | f18f7511a091dbf4d3fa6c3d7f4bf2acf4594f97 /libavcodec/ra144.c | |
parent | 9d2e6e84ceb10932713f8c1bdc11a0fa01de0fc1 (diff) | |
download | ffmpeg-84490b744e2f5dc485474562169d12b79eee9634.tar.gz |
Handle the case where we do not have enough input
Originally committed as revision 13282 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r-- | libavcodec/ra144.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 5fd2a245dc..5cfe94f25e 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -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++) |