From f74a733d0dc4b1b44bf9c85416ff2275fd89a7f4 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 31 May 2005 04:34:06 +0000 Subject: [PATCH] Fix for SC122 --- lib/phpmailer/class.smtp.php | 7 +++++++ 1 file changed, 7 insertions(+) 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