]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
We didn't stop after reading literal size. This broke using non-synced
authorTimo Sirainen <tss@iki.fi>
Thu, 20 Mar 2003 17:06:23 +0000 (19:06 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 20 Mar 2003 17:06:23 +0000 (19:06 +0200)
literals with APPEND.

--HG--
branch : HEAD

src/lib-imap/imap-parser.c

index 20d44cd8c8fd4e18b8b8a16cfa0ed15d51e90df4..41a49028a6405a97c33301dbf2b651c317222ecc 100644 (file)
@@ -560,8 +560,8 @@ int imap_parser_read_args(struct imap_parser *parser, unsigned int count,
 {
        parser->flags = flags;
 
-       while (count == 0 || parser->root_list->size < count ||
-              IS_UNFINISHED(parser)) {
+       while (!parser->eol && (count == 0 || parser->root_list->size < count ||
+                               IS_UNFINISHED(parser))) {
                if (!imap_parser_read_arg(parser))
                        break;
 
@@ -580,7 +580,7 @@ int imap_parser_read_args(struct imap_parser *parser, unsigned int count,
        } else if ((!IS_UNFINISHED(parser) && count > 0 &&
                    parser->root_list->size >= count) || parser->eol) {
                /* all arguments read / end of line. */
-               i_stream_skip(parser->input, parser->cur_pos);
+               i_stream_skip(parser->input, parser->cur_pos);
                parser->cur_pos = 0;
 
                if (parser->list_arg != NULL) {