From f63f43aeaa8a95baed64386e9992e8eecf3bdbb1 Mon Sep 17 00:00:00 2001 From: hiro Date: Wed, 18 Apr 2007 06:02:24 +0000 Subject: fixed crashes when trying to fetch >64KB messages on IMAP4 via FreeCap on Win32. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1647 ee746299-78ed-0310-b773-934348b2243d --- libsylph/recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libsylph/recv.c') diff --git a/libsylph/recv.c b/libsylph/recv.c index 47222709..d813eba7 100644 --- a/libsylph/recv.c +++ b/libsylph/recv.c @@ -50,7 +50,8 @@ gchar *recv_bytes(SockInfo *sock, glong size) do { gint read_count; - read_count = sock_read(sock, buf + count, size - count); + read_count = sock_read(sock, buf + count, + MIN(BUFFSIZE, size - count)); if (read_count <= 0) { g_free(buf); return NULL; -- cgit v1.2.3