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:
e371878
)
8svx: check packet size before reading the initial sample value.
author
Justin Ruggles
<justin.ruggles@gmail.com>
Tue, 6 Sep 2011 22:43:55 +0000
(18:43 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Thu, 22 Sep 2011 18:11:34 +0000
(14:11 -0400)
libavcodec/8svx.c
patch
|
blob
|
history
diff --git
a/libavcodec/8svx.c
b/libavcodec/8svx.c
index
adface2
..
0f53d39
100644
(file)
--- a/
libavcodec/8svx.c
+++ b/
libavcodec/8svx.c
@@
-74,6
+74,10
@@
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_si
int consumed = buf_size;
if(avctx->frame_number == 0) {
+ if (buf_size < 2) {
+ av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
+ return AVERROR(EINVAL);
+ }
esc->fib_acc = (int8_t)buf[1] + 128;
buf_size -= 2;
buf += 2;