Reddit
Would you like to stay up to date with C & C++? Checkout C & C++ Weekly.
Related searches:

Search whole site: site:www.securecoding.cert.org

Search title: I have been trying to understand what malloc(0) does, but it seems to behave just like malloc(1). I can see an actual pointer, it isn't NULL and I can write data to that memory location. What does a zero-length allocation actually do?

See how to search.