first of all, i am new on this list. hi all. i hope this is the correct
list to send bug fixes. if not, let me know.

some of my users experienced a bug in squirrelmail 1.4: they had a
message in their inbox with a illegal From: address, that contained a
'<' , but without the terminating '>' (god knows how that happened)

when parsing the address in imap_general.php, function parseAddress,
squirrelmail would enter an infinite loop.

adding the following simple check solved the problem. without it,
$pos would be reset to 1 every time.

case '<':  /* get email address */
  $addr_start = $pos;
  $addr_end = strpos($address,'>',$addr_start);

  /* check to prevent an infinite loop when parsing a broken address */
  if ($addr_end==0) {
    $addr_end = $j;
  }

  $addr = substr($address,$addr_start+1,$addr_end-$addr_start-1);
  $pos = $addr_end+1;
  break;

i hope this fix can be incorporated in a next release.

thanks for a wonderful application.

maarten


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
--
squirrelmail-users mailing list
List Address: [EMAIL PROTECTED]
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to