mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
20 lines
561 B
Diff
20 lines
561 B
Diff
commit 68aaf69a38e767a07c7ebedfe816e6425ea42f7d
|
|
Author: q66 <q66@chimera-linux.org>
|
|
Date: Thu Sep 7 17:16:06 2023 +0200
|
|
|
|
fix signed int overflow in pcm_softvol
|
|
|
|
diff --git a/src/pcm/pcm_softvol.c b/src/pcm/pcm_softvol.c
|
|
index 75f2aa0..38c6367 100644
|
|
--- a/src/pcm/pcm_softvol.c
|
|
+++ b/src/pcm/pcm_softvol.c
|
|
@@ -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
|