git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45f0623
)
avcodec/wmaprodec: check that there are input bits left in decode_subframe_length()
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 25 Sep 2013 18:10:24 +0000
(20:10 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 25 Sep 2013 18:10:24 +0000
(20:10 +0200)
Fixes infinite loop
Fixes Ticket2987
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmaprodec.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmaprodec.c
b/libavcodec/wmaprodec.c
index
4bd2d36
..
99b18eb
100644
(file)
--- a/
libavcodec/wmaprodec.c
+++ b/
libavcodec/wmaprodec.c
@@
-500,6
+500,9
@@
static int decode_subframe_length(WMAProDecodeCtx *s, int offset)
if (offset == s->samples_per_frame - s->min_samples_per_subframe)
return s->min_samples_per_subframe;
+ if (get_bits_left(&s->gb) < 1)
+ return AVERROR_INVALIDDATA;
+
/** 1 bit indicates if the subframe is of maximum length */
if (s->max_subframe_len_bit) {
if (get_bits1(&s->gb))