[FFmpeg-cvslog] wmavoice: fix a signed overflow

Mans Rullgard git at videolan.org
Mon Oct 10 03:59:51 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sun Oct  9 20:46:22 2011 +0100| [ba3f07d0611d9a6c10eaa90b3c058ecdffe76676] | committer: Mans Rullgard

wmavoice: fix a signed overflow

Signed-off-by: Mans Rullgard <mans at mansr.com>

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

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

diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index cff3f5f..3b805ac 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