[FFmpeg-cvslog] wmavoice: fix a signed overflow

Mans Rullgard git at videolan.org
Fri Nov 4 20:49:23 CET 2011


ffmpeg | branch: release/0.7 | Mans Rullgard <mans at mansr.com> | Sun Oct  9 20:46:22 2011 +0100| [33029d7353b2d005357ff7ef4d6968a9f70acb69] | committer: Michael Niedermayer

wmavoice: fix a signed overflow

Signed-off-by: Mans Rullgard <mans at mansr.com>
(cherry picked from commit ba3f07d0611d9a6c10eaa90b3c058ecdffe76676)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=33029d7353b2d005357ff7ef4d6968a9f70acb69
---

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

diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index c343080..2227352 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -1085,7 +1085,7 @@ static void aw_pulse_set2(WMAVoiceContext *s, GetBitContext *gb,
             int excl_range         = s->aw_pulse_range; // always 16 or 24
             uint16_t *use_mask_ptr = &use_mask[idx >> 4];
             int first_sh           = 16 - (idx & 15);
-            *use_mask_ptr++       &= 0xFFFF << first_sh;
+            *use_mask_ptr++       &= 0xFFFFu << first_sh;
             excl_range            -= first_sh;
             if (excl_range >= 16) {
                 *use_mask_ptr++    = 0;



More information about the ffmpeg-cvslog mailing list