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:
bdd62a6
)
adxdec: Fix division by zero
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 18 Dec 2011 19:10:51 +0000
(20:10 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 18 Dec 2011 19:49:34 +0000
(20:49 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/adxdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/adxdec.c
b/libavcodec/adxdec.c
index
20f2606
..
cf494c1
100644
(file)
--- a/
libavcodec/adxdec.c
+++ b/
libavcodec/adxdec.c
@@
-120,6
+120,8
@@
static int adx_decode_frame(AVCodecContext *avctx, void *data,
buf += header_size;
buf_size -= header_size;
}
+ if(c->channels <= 0)
+ return AVERROR_INVALIDDATA;
/* calculate number of blocks in the packet */
num_blocks = buf_size / (BLOCK_SIZE * c->channels);