summaryrefslogtreecommitdiff
path: root/libavcodec/wmaprodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-14 12:03:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-14 12:03:31 +0200
commitb28c678ba893876eb7a0c1768dea9dfa0fbeceb3 (patch)
tree772f8884dcb2afb0be259588113dff4f9b398442 /libavcodec/wmaprodec.c
parent97a5addfcf0029d0f5538ed70cb38cae4108a618 (diff)
wmaprodec; fix get_bits(0) case.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmaprodec.c')
-rw-r--r--libavcodec/wmaprodec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 419523590b..aa068264bd 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) {