wmavoice: fix a signed overflow
authorMans Rullgard <mans@mansr.com>
Sun, 9 Oct 2011 19:46:22 +0000 (20:46 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 4 Nov 2011 00:02:13 +0000 (01:02 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ba3f07d0611d9a6c10eaa90b3c058ecdffe76676)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/wmavoice.c

index c343080..2227352 100644 (file)
@@ -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;