mirror of https://git.musl-libc.org/git/musl
Browse Source
both passing a null pointer to memcpy with length 0, and adding 0 to a null pointer, are undefined. in some sense this is 'benign' UB, but having it precludes use of tooling that strictly traps on UB. there may be better ways to fix it, but conditioning the operations which are intended to be no-ops in the k==0 case on k being nonzero is a simple and safe solution.master
1 changed files with 5 additions and 3 deletions
Loading…
Reference in new issue