mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-13 19:01:03 +00:00
lavc/flacdec: Increase residual limit from INT_MAX to UINT_MAX
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
eef652ca9c
commit
296d3bbe16
@ -260,7 +260,7 @@ static int decode_residuals(FLACContext *s, int32_t *decoded, int pred_order)
|
|||||||
for (; i < samples; i++)
|
for (; i < samples; i++)
|
||||||
*decoded++ = get_sbits_long(&gb, tmp);
|
*decoded++ = get_sbits_long(&gb, tmp);
|
||||||
} else {
|
} else {
|
||||||
int real_limit = tmp ? (INT_MAX >> tmp) + 2 : INT_MAX;
|
int real_limit = (tmp > 1) ? (INT_MAX >> (tmp - 1)) + 2 : INT_MAX;
|
||||||
for (; i < samples; i++) {
|
for (; i < samples; i++) {
|
||||||
int v = get_sr_golomb_flac(&gb, tmp, real_limit, 1);
|
int v = get_sr_golomb_flac(&gb, tmp, real_limit, 1);
|
||||||
if (v == 0x80000000){
|
if (v == 0x80000000){
|
||||||
|
Loading…
Reference in New Issue
Block a user