mirror of https://git.musl-libc.org/git/musl
Browse Source
if shl() or shr() are called with n==8*sizeof(size_t), n is adjusted to 0. the shift by (sizeof(size_t) * 8 - n) that then follows will consequently shift by the width of size_t, which is UB and in practice produces an incorrect result. return early in this case. the bitvector p was already shifted by the required amount.master
committed by
Rich Felker
1 changed files with 2 additions and 0 deletions
Loading…
Reference in new issue