mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/takdec: Fix multiple runtime error: signed integer overflow: 637072 * 4096 cannot be represented in type 'int'
Fixes: 2079/clusterfuzz-testcase-minimized-5345861779324928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e4efd41b83
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
cd6cce2330
commit
31dd76349a
|
@ -855,7 +855,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
|
|||
|
||||
if (s->sample_shift[chan] > 0)
|
||||
for (i = 0; i < s->nb_samples; i++)
|
||||
decoded[i] *= 1 << s->sample_shift[chan];
|
||||
decoded[i] *= 1U << s->sample_shift[chan];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -897,7 +897,7 @@ static int tak_decode_frame(AVCodecContext *avctx, void *data,
|
|||
for (chan = 0; chan < avctx->channels; chan++) {
|
||||
int32_t *samples = (int32_t *)frame->extended_data[chan];
|
||||
for (i = 0; i < s->nb_samples; i++)
|
||||
samples[i] *= 1 << 8;
|
||||
samples[i] *= 1U << 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue