A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=313 ====================================================================== Reported By: sayler Assigned To: ====================================================================== Project: DBMail Issue ID: 313 Category: IMAP daemon Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 10-Mar-06 20:05 CET Last Modified: 10-Mar-06 20:06 CET ====================================================================== Summary: 2.1.5 IMAP daemon handles too-long times ungracefully Description: The various IMAP .c files seems to think (though they use their own #defines) that the maximum line length is 10240bytes. Unfortunately, if you exceed this maximum, the too-long command is truncated at 10239 characters (+ \0) and processed as normal. Additionally, the remaining (command length - 10239) characters will be processed the next time around as an IMAP command.
I think the logic in IMAPClientHandler should look like: fgets input -> line if fgets returned NULL die if the last character returned by fgets is not \r or \n: output error do: fgets input -> line until the last character returned by fgets is \n or \n: proceed to next command How does that sound? Matt ====================================================================== ---------------------------------------------------------------------- sayler - 10-Mar-06 20:06 ---------------------------------------------------------------------- ha ha, mantis cut my too-long command. Issue History Date Modified Username Field Change ====================================================================== 10-Mar-06 20:05 sayler New Issue 10-Mar-06 20:06 sayler Note Added: 0001036 ======================================================================