Code review request 6858865: Fix for 6728376 causes regression if the size of "data" is 0 and malloc returns Null for 0-length

Xueming Shen xueming.shen at
Fri Nov 19 07:32:52 UTC 2010


It might not be a real "regression" if only consider the supported platforms
(and yes, the malloc manpageI can found does clearly indicate NULL is 
for error).
However I prefer to add some checks to make sure it behaves the same
(compared to before the #6728376 change went it), even on the "weird OS"
that Mario has. Anyway, a 0-length really malloc should not trigger a OOME.

The webrev for #6728376 is at


More information about the core-libs-dev mailing list