[FFmpeg-cvslog] 4xm: check for invalid zero ac coeffs
Michael Niedermayer
git at videolan.org
Sun Jun 30 01:41:32 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 30 01:28:25 2013 +0200| [13c56e9a9cf18f33bcbc2dc1a5cf2a5f98ca9702] | committer: Michael Niedermayer
4xm: check for invalid zero ac coeffs
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=13c56e9a9cf18f33bcbc2dc1a5cf2a5f98ca9702
---
libavcodec/4xm.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 3e0e681..dc84e96 100644
--- 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);
More information about the ffmpeg-cvslog
mailing list