]> Pileus Git - ~andy/fetchmail/blobdiff - transact.c
Merge branch 'legacy_63'
[~andy/fetchmail] / transact.c
index 07aab00eb82b6f78a43f1903c756d5b6511b729a..2b8d04f8ec15e8b5256d90f2aa5545954340d722 100644 (file)
@@ -1416,7 +1416,15 @@ int readbody(int sock, struct query *ctl, flag forward, int len)
         * so we might end truncating messages prematurely.
         */
        if (!protocol->delimited && linelen > len) {
+           /* FIXME: HACK ALERT! This \r\n is only here to make sure the
+            * \n\0 hunt works later on. The \n generated here was not
+            * part of the original message!
+            * The real fix will be to use buffer + length strings,
+            * rather than 0-terminated C strings. */
+           inbufp[len++] = '\r';
+           inbufp[len++] = '\n';
            inbufp[len] = '\0';
+           linelen = len;
        }
 
        len -= linelen;