Making memcpy(NULL, NULL, 0) well-defined | Red Hat Developer

C2y makes memcpy(NULL, NULL, 0) and other zero-length operations on null pointers well defined. This removes a source of bugs that may result in security issues

Red Hat Developer
@zeux The old behavior was ridiculous. Implementations that failed on that should be ashamed.
@malwareminigun Yeah. I don't even know if implementations that did fail ever existed? All I know is I can stop putting pointless `> 0` checks to appease UBSAN at some point in the future.
@zeux I was told by some folks at committee meetings (Marshal Clow?) that both gcc and clang were affected because glibc's declaration of memcpy said that the parameters were not null.
@malwareminigun Yeah but that affects calling code presumably; I meant that implementations should have always supported this.
@zeux Oh, right. "Implementation" to mean means "Implementation of C++" meaning the compiler and standard library together.