math: fix signed int left shift ub in sqrt
[musl] / src / math / sqrtf.c
index 28cb4ad..d6ace38 100644 (file)
@@ -78,7 +78,6 @@ float sqrtf(float x)
                }
        }
        ix = (q>>1) + 0x3f000000;
-       ix += m << 23;
-       SET_FLOAT_WORD(z, ix);
+       SET_FLOAT_WORD(z, ix + ((uint32_t)m << 23));
        return z;
 }