wmavoice: fix a signed overflow

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
Mans Rullgard 2011-10-09 20:46:22 +01:00 committed by Reinhard Tartler
parent af0a56e6ef
commit 0b1ac7bf4f
1 changed files with 1 additions and 1 deletions

View 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;