http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4707


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From [EMAIL PROTECTED]  2005-11-27 09:21 -------
Committed revision 349191 to trunk.

Fixed the bug and added a regression test.

I didn't go for the bigger patch I was thinking of... It looks sloppy at first
glance having code like ((m->raw[i+1] == 'D') || (m->raw[i+1] == 'd')) and so
on. I thought about not repeating the arithmetic in the subscripts and not
repeating the array lookup. I even thought about having the loop use a memsrch
to find the next '\n' instead of looping through every character. But the time
spent to find the "\nDATA\n" string near the beginning of a BSMTP message just
doesn't justify making the code any more difficult to read, and it is the
compiler's job to optimize repeated use of expressions like that.

I did apply a somewhat different patch than Ulf proposed. Instead of checking
for a short message and bailing out, I avoided using a subtraction on an
unsigned int where there is danger of the unsigned int underflow that was
causing the seg fault problem.




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to