#19280 [Fbk->Opn]: imap_header() fails with many To: addresses

From: Date: Sat, 07 Sep 2002 18:08:11 +0000
Subject: #19280 [Fbk->Opn]: imap_header() fails with many To: addresses
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18631@lists.php.net to get a copy of this message
 ID:               19280
 User updated by:  mose@ns.cune.edu
 Reported By:      mose@ns.cune.edu
-Status:           Feedback
+Status:           Open
 Bug Type:         IMAP related
 Operating System: RedHat 7.3, 2.4.19
 PHP Version:      4CVS-2002-09-07
 New Comment:

No, I have not tried this with earlier versions of Apache or c-client.

This seems to be the sequence of events.

imap_header() called in php with the message number
_php_make_header_object() called with envelope information
_php_imap_parse_address(en->to...) called to parse To:

It then makes various trips through the do while loop.  The message I
have with 128 addresses always makes 18 trips through the loop and then
consistently blows up the 19th time at the line with "if
(addresstmp->host)".

It's possible that this isn't the real location of the problem.  Rather
it might be a memory allocation problem when the envelope information
is created, since there is such a large number of To: addresses.  19
addresses could be close 1024 bytes.


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

[2002-09-07 12:49:12] kalowsky@php.net

Any chance you've tried this with Apache1?  Or a non-dev version of
c-client?

------------------------------------------------------------------------

[2002-09-07 10:25:42] mose@ns.cune.edu

imap-2002.RC5 (also does not work with imap-2002.RC2)
Apache 2.0.40
openldap 2.1.4
mysql 3.23.49
configure --with-apxs2=/local/apache/bin/apxs
--enable-force-cgi-redirect --disable-cli
--with-imap=/home/xxx/imap-2002.RC5 --with-ldap
--with-mysql=/local/mysql

The call to imap_header() fails on messages with many To: addresses. 
One message I received has 128 addresses in the To: field (of the form
"Firstname Lastname" <Firstname.Lastname@example.com>).  Other messages
with fewer addresses do not cause a problem.

There is a bug in the database that was supposed to have been fixed in
CVS in June.  Either that change has not made it into the current CVS,
or this is a different bug.  I'd be happy to mail someone a typical
message that produces the problem.  However, you should easily be able
to craft such a message yourself in a text file by simply repeating the
address in the To: field.

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19280&edit=1



Thread (17 messages)

« previous php.bugs (#18631) next »