#45705 [Opn->Asn]: imap_rfc822_parse_adrlist() modifies passed address by adding NUL byte to it

From: Date: Mon, 04 Aug 2008 13:12:10 +0000
Subject: #45705 [Opn->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-127571@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:           Open
+Status:           Assigned
 Bug Type:         IMAP related
 Operating System: Linux
 PHP Version:      5.3.0alpha1
-Assigned To:      
+Assigned To:      jani
 New Comment:

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? :)


Previous Comments:
------------------------------------------------------------------------

[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



Thread (5 messages)

« previous php.bugs (#127571) next »