diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-09-22 01:27:21 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2014-09-22 01:27:21 +0000 |
commit | c1afc5c0b34746f9ef96e4371a2ae503348d1ad9 (patch) | |
tree | 2b14dd084b8bb9b59f0b81ce37a637e4889f569a | |
parent | 160166c96b5484ae2afe4fdd5c349349dae671e7 (diff) |
fixed a bug that wrote the first part of data if an IMAP4 data didn't end with CR+LF.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3425 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libsylph/recv.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2014-09-22 + + * libsylph/recv.c: recv_bytes_write(): fixed a bug that wrote the + first part of data if it didn't end with CR+LF (thanks to Yohei Endo + for pointing it out). This bug affected IMAP4. + 2014-06-13 * version 3.5.0beta1 diff --git a/libsylph/recv.c b/libsylph/recv.c index c25108f3..1abcf7c1 100644 --- a/libsylph/recv.c +++ b/libsylph/recv.c @@ -225,7 +225,7 @@ gint recv_bytes_write(SockInfo *sock, glong size, FILE *fp) } if (prev - buf < size && fp && - fwrite(buf, sizeof(gchar), size - (prev - buf), fp) == EOF) { + fwrite(prev, sizeof(gchar), size - (prev - buf), fp) == EOF) { perror("fwrite"); g_warning(_("Can't write to file.\n")); fp = NULL; |