pcm: sofvol plugin: fix signed overflow

This fixes functionality on specific setups with UBSan.

Closes: https://github.com/alsa-project/alsa-lib/pull/351
Signed-off-by: q66 <q66@chimera-linux.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
q66 2023-09-07 23:13:01 +02:00 committed by Jaroslav Kysela
parent f0658e6dbd
commit 55a758a964

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