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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: krei+public at it dot net dot au
New email:
PHP Version: OS:

 

 [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: Fri Nov 22 05:01:29 2024 UTC