mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Check that we have enough input data in IMC decoder.
Originally committed as revision 11872 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ddf969705f
commit
63f2670a53
@ -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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user