diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-02-05 18:39:55 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2008-02-05 18:39:55 +0000 |
commit | 63f2670a53aaedc7a9fff14e87da575548078f4d (patch) | |
tree | bbfadc8da76358af27cf6527b1b2a91a356db069 /libavcodec | |
parent | ddf969705f7c8463496c247dbac83419317ec35f (diff) | |
download | ffmpeg-63f2670a53aaedc7a9fff14e87da575548078f4d.tar.gz |
Check that we have enough input data in IMC decoder.
Originally committed as revision 11872 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/imc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 35702f9b72..237ff6816c 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -638,6 +638,10 @@ static int imc_decode_frame(AVCodecContext * avctx, int counter, bitscount; uint16_t buf16[IMC_BLOCK_SIZE / 2]; + if (buf_size < IMC_BLOCK_SIZE) { + av_log(avctx, AV_LOG_ERROR, "imc frame too small!\n"); + return -1; + } for(i = 0; i < IMC_BLOCK_SIZE / 2; i++) buf16[i] = bswap_16(((const uint16_t*)buf)[i]); |