go to bug id or search bugs for
There was a patch on April 1 for imap.c that added a sanity check to the from and subject lengths when calling imap_headerinfo()
The error message says that the from / subject lengths have to be between 1 and 1024. However it will not accept a fromlength of 1024 due to the >= operator. MAILTMPLEN is 1024
This causes a problem for the pear library IMAPv2 as it defaults the fromlength and subjectlength to 1024
Either the error message must be updated to MAILTMPLEN-1, or the operator and char array must be changed (this is preferred as to not bust IMAPv2)
I don't have a good example as I use IMAPv2. However, it seems like a simple problem just by looking at the code
imap_headerinfo should accept a fromlength of 1024
A warning is given:
Jul 8 00:01:49 php: PHP Warning: imap_headerinfo(): From length has to be between 1 and 1024 in /usr/local/lib/php/Mail/IMAPv2.php on line 1505
Add a Patch
Add a Pull Request
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.
I noticed the buffer size for the from / subject data wasn't increased.
Does it not need to be:
fulladdress[MAILTMPLEN + 1];
Since a subject of 1024 would fill fulladdress and not have room for a null byte at the end?
Felipe, please check that (sorry I'm too lazy to do it myself *g*)
Opss, you are right. Fixed! Thanks. :)