OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddf9697
)
Check that we have enough input data in IMC decoder.
author
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Tue, 5 Feb 2008 18:39:55 +0000
(18:39 +0000)
committer
Reimar Döffinger
<Reimar.Doeffinger@gmx.de>
Tue, 5 Feb 2008 18:39:55 +0000
(18:39 +0000)
Originally committed as revision 11872 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/imc.c
patch
|
blob
|
history
diff --git
a/libavcodec/imc.c
b/libavcodec/imc.c
index
35702f9
..
237ff68
100644
(file)
--- 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]);