From: Ilia Alshanetsky Date: Sun, 4 Jul 2004 16:53:02 +0000 (+0000) Subject: MFH: Fixed bug #28963 (Missing space for \0 in address allocation). X-Git-Tag: php-4.3.9RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fea008a67fb927b368f21572a1cfce43668097ac;p=php MFH: Fixed bug #28963 (Missing space for \0 in address allocation). --- diff --git a/NEWS b/NEWS index 351185ba9d..856f0d3de5 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP 4 NEWS - Updated PCRE to provide better error handling in certain cases. (Andrei) - NSAPI: added "bucket" parameter to list of non-php.ini-keys of php4_execute for doing performance stats without warnings in server-log. (Uwe Schindler) +- Fixed bug #28963 (Missing space for \0 in address allocation). (Ilia) - Fixed bug #28897 (ibase: -1 returned as -0.000 for 64-bit scaled int). (Ard) - Fixed bug #28879 (Implicit/Explicit array creation inconsistency when using Resources, Arrays, or Objects as indices). (Sara) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 73fce1b8c7..8f9adda0bb 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3683,7 +3683,7 @@ static void _php_imap_parse_address (ADDRESS *addresslist, char **fulladdress, z addresstmp = addresslist; if ((len = _php_imap_address_size(addresstmp))) { - tmpstr = (char *) malloc (len); + tmpstr = (char *) malloc(len + 1); tmpstr[0] = '\0'; rfc822_write_address(tmpstr, addresstmp); *fulladdress = tmpstr;