pcm: fix signed overflow in pcm_softvol

This fixes functionality on specific setups with UBSan.

Signed-off-by: q66 <q66@chimera-linux.org>
This commit is contained in:
q66 2023-09-07 23:13:01 +02:00
parent 10bd599970
commit b2e5297c6d

View file

@ -113,7 +113,7 @@ static inline int MULTI_DIV_32x16(int a, unsigned short b)
y.i = 0;
#if __BYTE_ORDER == __LITTLE_ENDIAN
x.i = (unsigned short)v.s[0];
x.i *= b;
x.i *= (unsigned int)b;
y.s[0] = x.s[1];
y.i += (int)v.s[1] * b;
#else