Commit a28dcae0 authored by reimar's avatar reimar

Check that we have enough input data in IMC decoder.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11872 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1478cba9
...@@ -638,6 +638,10 @@ static int imc_decode_frame(AVCodecContext * avctx, ...@@ -638,6 +638,10 @@ static int imc_decode_frame(AVCodecContext * avctx,
int counter, bitscount; int counter, bitscount;
uint16_t buf16[IMC_BLOCK_SIZE / 2]; 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++) for(i = 0; i < IMC_BLOCK_SIZE / 2; i++)
buf16[i] = bswap_16(((const uint16_t*)buf)[i]); buf16[i] = bswap_16(((const uint16_t*)buf)[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