ok, so, you know how the standards (C/POSIX) allow malloc(0) to return NULL?

i went to refresh my memory after a discussion of a security issue today and as best as i can tell, no commonly used OS has ever had malloc(0) return NULL, including historical ones¹. windows, glibc, musl, BSDs, all return a non-NULL pointer to some object

¹nabijaczleweli.xyz/content/blo

0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/whitequark/statuses/114741069835582723 on your instance and quote it. (Note that quoting is not supported in Mastodon.)