]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #28963 (Missing space for \0 in address allocation).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 4 Jul 2004 16:53:02 +0000 (16:53 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 4 Jul 2004 16:53:02 +0000 (16:53 +0000)
NEWS
ext/imap/php_imap.c

diff --git a/NEWS b/NEWS
index 351185ba9d0b620bcbb7be78626c1466f623346e..856f0d3de5e2c3858e45a5090b849faebb9832a8 100644 (file)
--- 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)
index 73fce1b8c7d0240eae3f04654b636a2df8564ed2..8f9adda0bbb352a817c8269678f114407b971c8b 100644 (file)
@@ -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;