Thijs <aap
(no closing ">"), parseAddress would enter an infinite loop. This is
solved by increasing $pos when no closing > is found. Closes 742584,
thanks Jeroen van Wolffelaar.
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4939
7612ce4b-ef26-0410-bec9-
ea0150e637f0
case '<': /* get email address */
$addr_start = $pos;
$addr_end = strpos($address,'>',$addr_start);
- $addr = substr($address,$addr_start+1,$addr_end-$addr_start-1);
- $pos = $addr_end+1;
+ if($addr_end === FALSE) {
+ // in case the address doesn't end, prevent loop
+ $pos++;
+ } else {
+ $addr = substr($address,$addr_start+1,$addr_end-$addr_start-1);
+ $pos = $addr_end+1;
+ }
break;
case '(': /* rip off comments */
$addr_start = $pos;