[imp] bug in horde/lib/Text/Flowed.php (horde 3.0.6)

Larry Broda lbroda at uiuc.edu
Mon Nov 14 09:30:01 PST 2005


Horde 3.0.6 (with Imp 4.0.4)

With a text line of a certain form, Flowed.php goes into an infinite 
loop, resulting in a hung IMP compose window when "send" is pressed, 
and an httpd process that grows larger and larger while eating up CPU.  
This  behavior can be caused by sending a message containing a line 
which begins with spaces, followed by a ">" character and directly 
followed (no more space) by a line long enough to invoke the wrapping 
algorithm, but containing no word breaks.  The example I used was a 
line of two or three spaces, a ">", and 100 or more hyphens.

  The problem occurs in the loop at line 234 of 
horde/lib/Text/Flowed.php.  The pattern match at line 247 returns an 
empty string in $m[1], and the original line (though with only one 
leading space) in $m[2].  A line with one space is added to the output, 
and $line is set to $m[2].  This then repeats forever.

I could not find a reference to this, but I apologize if this is a 
known issue.  Also, I don't feel I understand the algorithm well enough 
at this point to suggest a patch; I'm afraid I'd substitute one  
problem for another.

Larry Broda

---
Larry Broda
Systems Administration
Psychology Dept, University of Illinois at Urbana-Champaign
lbroda at uiuc.edu




More information about the imp mailing list