diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-12-04 06:44:56 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-12-04 06:44:56 +0000 |
commit | d89d0243979a85456895e72e658116b760527bdc (patch) | |
tree | 3e357ac717eb51384fd85e44d0a21f4191649de7 /lib-src/movemail.c | |
parent | 070c25062342b2b299e644463fb6d95b9421694e (diff) | |
download | emacs-d89d0243979a85456895e72e658116b760527bdc.tar.gz |
Allow messages retrieved from the POP
server to contain embedded nulls.
Diffstat (limited to 'lib-src/movemail.c')
-rw-r--r-- | lib-src/movemail.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c index b7b51d35061..e010d6f9806 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -795,12 +795,12 @@ pop_retr (server, msgno, arg) return (NOTOK); } - while (! (ret = pop_retrieve_next (server, &line))) + while ((ret = pop_retrieve_next (server, &line)) >= 0) { if (! line) break; - if (mbx_write (line, arg) != OK) + if (mbx_write (line, ret, arg) != OK) { strcpy (Errmsg, strerror (errno)); pop_close (server); @@ -826,8 +826,9 @@ pop_retr (server, msgno, arg) && (a[4] == ' ')) int -mbx_write (line, mbf) +mbx_write (line, len, mbf) char *line; + int len; FILE *mbf; { #ifdef MOVEMAIL_QUOTE_POP_FROM_LINES @@ -844,7 +845,7 @@ mbx_write (line, mbf) line++; len--; } - if (fputs (line, mbf) == EOF) + if (fwrite (line, 1, len, mbf) != len) return (NOTOK); if (fputc (0x0a, mbf) == EOF) return (NOTOK); |