mirror of
https://github.com/mpv-player/mpv
synced 2025-03-09 23:58:06 +00:00
af_scaletempo: handle obscure integer overflow
Saw it once, not really reproducible. This should fix it, and in any case it's harmless.
This commit is contained in:
parent
376aea36eb
commit
0edeb0899a
@ -187,10 +187,10 @@ static int best_overlap_offset_s16(struct priv *s)
|
||||
ps += s->samples_overlap - s->num_channels;
|
||||
long i = -(s->samples_overlap - s->num_channels);
|
||||
do {
|
||||
corr += ppc[i + 0] * ps[i + 0];
|
||||
corr += ppc[i + 1] * ps[i + 1];
|
||||
corr += ppc[i + 2] * ps[i + 2];
|
||||
corr += ppc[i + 3] * ps[i + 3];
|
||||
corr += ppc[i + 0] * (int64_t)ps[i + 0];
|
||||
corr += ppc[i + 1] * (int64_t)ps[i + 1];
|
||||
corr += ppc[i + 2] * (int64_t)ps[i + 2];
|
||||
corr += ppc[i + 3] * (int64_t)ps[i + 3];
|
||||
i += 4;
|
||||
} while (i < 0);
|
||||
if (corr > best_corr) {
|
||||
|
Loading…
Reference in New Issue
Block a user