forked from FFmpeg/FFmpeg
avcodec/wavpackenc: Use unsigned for potential 31bit shift
Fixes: CID1465481 Unintentional integer overflow Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
30f2bac9f7
commit
6f976db251
1 changed files with 2 additions and 2 deletions
|
@ -1979,7 +1979,7 @@ static void encode_flush(WavPackEncodeContext *s)
|
|||
put_bits(pb, 31, 0x7FFFFFFF);
|
||||
cbits -= 31;
|
||||
} else {
|
||||
put_bits(pb, cbits, (1 << cbits) - 1);
|
||||
put_bits(pb, cbits, (1U << cbits) - 1);
|
||||
cbits = 0;
|
||||
}
|
||||
} while (cbits);
|
||||
|
@ -2008,7 +2008,7 @@ static void encode_flush(WavPackEncodeContext *s)
|
|||
put_bits(pb, 31, 0x7FFFFFFF);
|
||||
cbits -= 31;
|
||||
} else {
|
||||
put_bits(pb, cbits, (1 << cbits) - 1);
|
||||
put_bits(pb, cbits, (1U << cbits) - 1);
|
||||
cbits = 0;
|
||||
}
|
||||
} while (cbits);
|
||||
|
|
Loading…
Add table
Reference in a new issue