mirror of https://git.musl-libc.org/git/musl
Browse Source
the result of the 0xffff mask with the exit status could have bit 15 set, in which case multiplying by 0x10001 overflows 32-bit signed int. making the multiply unsigned avoids the overflow. it also changes the sign extension behavior of the subsequent >> operation, but the affected bits are all unwanted anyway and all discarded by the cast to short.master
2 changed files with 2 additions and 2 deletions
Loading…
Reference in new issue