projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
math: fix signed int left shift ub in sqrt
[musl]
/
src
/
math
/
sqrt.c
diff --git
a/src/math/sqrt.c
b/src/math/sqrt.c
index
b277567
..
f1f6d76
100644
(file)
--- a/
src/math/sqrt.c
+++ b/
src/math/sqrt.c
@@
-179,7
+179,6
@@
double sqrt(double x)
ix1 = q1>>1;
if (q&1)
ix1 |= sign;
- ix0 += m << 20;
- INSERT_WORDS(z, ix0, ix1);
+ INSERT_WORDS(z, ix0 + ((uint32_t)m << 20), ix1);
return z;
}