[FFmpeg-cvslog] wmalosslessdec: Fix reading too many bits in decode_channel_residues()

Michael Niedermayer git at videolan.org
Sat Apr 14 15:19:00 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Apr 14 14:51:24 2012 +0200| [b3a43515827f3d22a881c33b87384f01c86786fd] | committer: Michael Niedermayer

wmalosslessdec: Fix reading too many bits in decode_channel_residues()

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=b3a43515827f3d22a881c33b87384f01c86786fd
---

 libavcodec/wmalosslessdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index a806c38..3b68cca 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -520,7 +520,7 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size)
             residue = quo;
         else {
             rem_bits = av_ceil_log2(ave_mean);
-            rem      = rem_bits ? get_bits(&s->gb, rem_bits) : 0;
+            rem      = get_bits_long(&s->gb, rem_bits);
             residue  = (quo << rem_bits) + rem;
         }
 



More information about the ffmpeg-cvslog mailing list