mirror of
https://github.com/google/liblc3.git
synced 2026-04-17 21:25:30 +00:00
sanitizer: prevent sub that result in negative unsigned result
This commit is contained in:
@@ -147,7 +147,7 @@ static inline int32_t fast_db_q16(float x)
|
||||
|
||||
union { float f; uint32_t u; } x2 = { .f = x*x };
|
||||
|
||||
int e2 = (x2.u >> 22) - 2*127;
|
||||
int e2 = (int)(x2.u >> 22) - 2*127;
|
||||
int hi = (x2.u >> 18) & 0x1f;
|
||||
int lo = (x2.u >> 2) & 0xffff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user