php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14575 inappropriate pass by reference?
Submitted: 2001-12-18 07:02 UTC Modified: 2001-12-18 07:10 UTC
From: krei+public at it dot net dot au Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.1.0 OS: Linux 2.4.10 (Debian)
Private report: No CVE-ID: None
 [2001-12-18 07:02 UTC] krei+public at it dot net dot au
4.1.0RC2 
"array imap_rfc822_parse_adrlist (string address, string default_host)"

The address argument appears to be erroneously passed by reference, and is subsequently mutilated by the function. Hence the following code produces unexpected results. Any subsequent call to imap_rfc822_parse_adrlist() will fail. (This causes major problems with IMP 2.2.6)


$a="aaaaa <a@a.a>";
$b="bbbbb <b@b.b>";
$c=$a;
imap_rfc822_parse_adrlist($a, "troz");
dump("a:$a\nb:$b\nc:$c\n");

output is:
a:aaaaa^@<a@a.a>
b:bbbbb <b@b.b>
c:aaaaa^@<a@a.a>

Note the null character replacing the space between the personal name and mailbox name.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-18 07:10 UTC] hholzgra@php.net
this has already been fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 22:01:28 2024 UTC