#45705 [Asn]: imap_rfc822_parse_adrlist() modifies passed address by adding NUL byte to it
| From: | jani@php.net | Date: | Mon, 04 Aug 2008 13:36:06 +0000 |
| Subject: | #45705 [Asn]: imap_rfc822_parse_adrlist() modifies passed address by adding NUL byte to it | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-127573@lists.php.net to get a copy of this message | ||
ID: 45705
Updated by: jani@php.net
Reported By: jan at horde dot org
Status: Assigned
Bug Type: IMAP related
Operating System: Linux
PHP Version: 5.3.0alpha1
Assigned To: jani
New Comment:
Can't reproduce with PHP_5_2 branch. Looks like someone didn't bother
merging some fixes from that branch to HEAD/PHP_5_3..
Previous Comments:
------------------------------------------------------------------------
[2008-08-04 13:12:10] jani@php.net
I guess this affects ALL places using rfc822_parse_adrlist() and not
duplicating the passed data. I'll look into this. Maybe you could
provide more tests those functions that use this c-client func? :)
------------------------------------------------------------------------
[2008-08-04 09:48:47] jan at horde dot org
Description:
------------
imap_rfc822_parse_adrlist() adds a NUL byte (actually replace a space
with one) in the passed string argument.
Reproduce code:
---------------
--TEST--
imap_rfc822_parse_adrlist() adding NUL byte to argument.
--SKIPIF--
<?php if (!extension_exists('imap')) echo 'skip IMAP extension not
installed'; ?>
--FILE--
<?php
$address = 'John Doe <john@example.com>';
imap_rfc822_parse_adrlist($address, null);
echo $address;
?>
--EXPECT--
John Doe <john@example.com>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45705&edit=1