projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d6eabd
)
4xm: check for invalid zero ac coeffs
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 29 Jun 2013 23:28:25 +0000
(
01:28
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 29 Jun 2013 23:35:22 +0000
(
01:35
+0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/4xm.c
patch
|
blob
|
history
diff --git
a/libavcodec/4xm.c
b/libavcodec/4xm.c
index
3e0e681
..
dc84e96
100644
(file)
--- a/
libavcodec/4xm.c
+++ b/
libavcodec/4xm.c
@@
-525,7
+525,12
@@
static int decode_i_block(FourXContext *f, int16_t *block)
if (code == 0xf0) {
i += 16;
} else {
- level = get_xbits(&f->gb, code & 0xf);
+ if (code & 0xf) {
+ level = get_xbits(&f->gb, code & 0xf);
+ } else {
+ av_log(f->avctx, AV_LOG_ERROR, "0 coeff\n");
+ return AVERROR_INVALIDDATA;
+ }
i += code >> 4;
if (i >= 64) {
av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);