Re: Memory corruption bug
| From: | Andrei Zmievski | Date: | Fri, 26 Jun 2009 22:15:34 +0000 |
| Subject: | Re: Memory corruption bug | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44498@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
You just did safe_address in _safe_malloc(nmemb, len, 0) which should have called E_ERROR if nmemb*len overflows, so do you need to do it again? Leaving a comment about it wouldn't hurt though :)Yeah, you're right, but I didn't write the code. :) Regardless, I think this fix should go into 5.2/5.3 because calloc() advertises memory clearing as part of its API contract. -Andrei