logoalt Hacker News

eesmithyesterday at 6:10 PM0 repliesview on HN

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.