Fixed a bug that would only appear with an obscenely long line in the email.
[squirrelmail.git] / functions / imap_general.php
index 05915354b7168d013efb81aeae85f5940dbcedf5..a80993503959a25526a43ea1a53d8a5c644508ea 100755 (executable)
@@ -74,6 +74,9 @@
                } else {
                   $data[] = $read;
                   $read = fgets($imap_stream, 9096);
+                 while (strpos($read, "\n") === false) {
+                    $read .= fgets($imap_stream, 9096);
+                 }
                }
                $total_size += strlen($read);
             } else {