Commit e8a3498f authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 *...

avcodec/dca_xll: Fix runtime error: signed integer overflow: -1073741824 * 32768 cannot be represented in type 'int'

Fixes: 629/clusterfuzz-testcase-6697457381539840

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0a65dae9
......@@ -717,10 +717,10 @@ static void chs_assemble_msbs_lsbs(DCAXllDecoder *s, DCAXllChSet *c, int band)
int32_t *lsb = b->lsb_sample_buffer[ch];
int adj = b->bit_width_adjust[ch];
for (n = 0; n < nsamples; n++)
msb[n] = msb[n] * (1 << shift) + (lsb[n] << adj);
msb[n] = msb[n] * (SUINT)(1 << shift) + (lsb[n] << adj);
} else {
for (n = 0; n < nsamples; n++)
msb[n] = msb[n] * (1 << shift);
msb[n] = msb[n] * (SUINT)(1 << shift);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment