[FFmpeg-cvslog] wmaprodec; fix get_bits(0) case.
Michael Niedermayer
git at videolan.org
Sat Apr 14 12:43:36 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 14 12:03:04 2012 +0200| [b28c678ba893876eb7a0c1768dea9dfa0fbeceb3] | committer: Michael Niedermayer
wmaprodec; fix get_bits(0) case.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b28c678ba893876eb7a0c1768dea9dfa0fbeceb3
---
libavcodec/wmaprodec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 4195235..aa06826 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1130,7 +1130,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
int num_fill_bits;
if (!(num_fill_bits = get_bits(&s->gb, 2))) {
int len = get_bits(&s->gb, 4);
- num_fill_bits = get_bits(&s->gb, len) + 1;
+ num_fill_bits = (len ? get_bits(&s->gb, len) : 0) + 1;
}
if (num_fill_bits >= 0) {
More information about the ffmpeg-cvslog
mailing list