diff --git a/lib/phpmailer/class.smtp.php b/lib/phpmailer/class.smtp.php index a4013745566..3b0b0b59a25 100644 --- a/lib/phpmailer/class.smtp.php +++ b/lib/phpmailer/class.smtp.php @@ -332,6 +332,13 @@ class SMTP # smaller lines while(strlen($line) > $max_line_length) { $pos = strrpos(substr($line,0,$max_line_length)," "); + + // Fix from http://www.addict3d.org/index.php?page=viewarticle&type=security&ID=4079 + if (!$pos) { + $pos = $max_line_length - 1; + } + // End of fix + $lines_out[] = substr($line,0,$pos); $line = substr($line,$pos + 1); # if we are processing headers we need to