Re: Re: Bug #1019: imap_header() not working correctly

From: Date: Sun, 03 Jan 1999 02:30:50 +0000
Subject: Re: Re: Bug #1019: imap_header() not working correctly
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-3200@lists.php.net to get a copy of this message
no. imap_header works fine. the to, cc,bcc..etc return more than one element in the arrays. you are most likely not accessing the variables correctly. if you look closer in the code, you'll see that a temporary variable is set to the next pointer, and then that pointer is set to NULL. but inside of it all, it loops through all of the addresses. it's very ugly, but had to be put in to avoid buffer overflow problems. take a look at the cvsw history logs, specificly revision 1.36 but like i said, you are most likely using the object or array incorrectly, because i use it all the time. Mark > > ------- =_aaaaaaaaaa0 > Content-Type: text/plain; charset="us-ascii" > Content-ID: <6854.915133923.1@aplotnick.eng.tvol.net> > > The following patch appears to fix imap_header(). I don't know why the > lines that I'm removing where put there in the first place, though, so > if they do, in fact, need to be there, I'll be happy to find another > way around the problem. > > Thanks, > > Alex Plotnick <alex@wgate.com> > WorldGate Communications, Inc. > > > ------- =_aaaaaaaaaa0 > Content-Type: text/plain; charset="us-ascii" > Content-ID: <6854.915133923.2@aplotnick.eng.tvol.net> > > Index: functions/imap.c > =================================================================== > RCS file: /repository/php3/functions/imap.c,v > retrieving revision 1.49 > diff -u -r1.49 imap.c > --- functions/imap.c 1998/11/23 05:52:03 1.49 > +++ functions/imap.c 1998/12/31 19:30:06 > @@ -1191,7 +1191,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1230,7 +1229,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1269,7 +1267,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1307,7 +1304,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1345,7 +1341,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1383,7 +1378,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > @@ -1421,7 +1415,6 @@ > while(ok && addresstmp) /* while length < 1000 and we are not at the end of the > list */ > { > addresstmp2=addresstmp->next; /* save the pointer to the next address */ > - addresstmp->next=NULL; /* make this address the only one now. */ > tempaddress[0]=0x00; /* reset tempaddress buffer */ > rfc822_write_address(tempaddress,addresstmp); /* ok, write the address into tempaddress > string */ > if((strlen(tempaddress) + strlen(fulladdress)) < 1000) /* is the new address + total > address < 1000 */ > > ------- =_aaaaaaaaaa0-- > > -- > PHP Development Mailing List http://www.php.net/ > To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net > For help: php-dev-help@lists.php.net > > -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#3200) next »