diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 13:36:53 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 13:36:53 +0000 |
commit | 237e720198ab715d96cb75b86ade41431f64e8c4 (patch) | |
tree | b32bc4937f089c06bac01f6de259a38723dc48fc /transact.c | |
parent | 1905e1713f92c076af443f560f2ac0c0a864a1df (diff) | |
download | fetchmail-237e720198ab715d96cb75b86ade41431f64e8c4.tar.gz fetchmail-237e720198ab715d96cb75b86ade41431f64e8c4.tar.bz2 fetchmail-237e720198ab715d96cb75b86ade41431f64e8c4.zip |
Cosmetic fix.
svn path=/trunk/; revision=3844
Diffstat (limited to 'transact.c')
-rw-r--r-- | transact.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -442,29 +442,29 @@ int readheaders(int sock, linelen += n; msgblk.msglen += n; - /* - * Try to gracefully handle the case, where the length of a - * line exceeds MSGBUFSIZE. - */ - if ( n && buf[n-1] != '\n' ) { - overlong = TRUE; - rline = (char *) realloc(line, linelen + 1); - if (rline == NULL) - { - free (line); - return(PS_IOERR); - } - line = rline; - memcpy(line + linelen - n, buf, n); - line[linelen] = '\0'; - ch = ' '; /* So the next iteration starts */ - continue; + /* + * Try to gracefully handle the case where the length of a + * line exceeds MSGBUFSIZE. + */ + if (n && buf[n-1] != '\n') + { + overlong = TRUE; + rline = (char *) realloc(line, linelen + 1); + if (rline == NULL) + { + free (line); + return(PS_IOERR); } - + line = rline; + memcpy(line + linelen - n, buf, n); + line[linelen] = '\0'; + ch = ' '; /* So the next iteration starts */ + continue; + } /* lines may not be properly CRLF terminated; fix this for qmail */ - /* we don't want to overflow the buffer here */ - if (ctl->forcecr && buf[n-1] == '\n' && (n == 1 || buf[n-2] != '\r')) + /* we don't want to overflow the buffer here */ + if (ctl->forcecr && buf[n-1]=='\n' && (n==1 || buf[n-2]!='\r')) { char * tcp; rline = (char *) realloc(line, linelen + 2); |