←back to thread

48 points ingve | 1 comments | | HN request time: 0.327s | source
1. eesmith ◴[] No.44389812[source]
I maintained a program which failed on, as I recall, AIX (mentioned in the essay) because malloc(0) returned NULL.

It's been 30 years so I've forgotten the details. My solution was to always allocate size+1 since memory use was far from critical.