OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
886b40b
)
wmalossless: Fix infinite loop.
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 19 Feb 2012 20:50:18 +0000
(21:50 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 19 Feb 2012 21:08:21 +0000
(22:08 +0100)
Fixes more of Ticket1000
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmalosslessdec.c
patch
|
blob
|
history
diff --git
a/libavcodec/wmalosslessdec.c
b/libavcodec/wmalosslessdec.c
index
79cd5f4
..
b32731f
100644
(file)
--- a/
libavcodec/wmalosslessdec.c
+++ b/
libavcodec/wmalosslessdec.c
@@
-713,8
+713,11
@@
static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
//av_log(0, 0, "%8d: ", num_logged_tiles++);
for(; i < tile_size; i++) {
int quo = 0, rem, rem_bits, residue;
- while(get_bits1(&s->gb))
+ while(get_bits1(&s->gb))
{
quo++;
+ if (get_bits_left(&s->gb) <= 0)
+ return -1;
+ }
if(quo >= 32)
quo += get_bits_long(&s->gb, get_bits(&s->gb, 5) + 1);