projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e190e45
)
smacker: check buffer size before reading output size
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 21 Sep 2011 15:42:55 +0000
(11:42 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Tue, 11 Oct 2011 11:48:16 +0000
(07:48 -0400)
libavcodec/smacker.c
patch
|
blob
|
history
diff --git
a/libavcodec/smacker.c
b/libavcodec/smacker.c
index
f3dec7f
..
20ddc15
100644
(file)
--- a/
libavcodec/smacker.c
+++ b/
libavcodec/smacker.c
@@
-586,6
+586,11
@@
static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int bits, stereo;
int pred[2] = {0, 0};
+ if (buf_size <= 4) {
+ av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
+ return AVERROR(EINVAL);
+ }
+
unp_size = AV_RL32(buf);
init_get_bits(&gb, buf + 4, (buf_size - 4) * 8);