From: Hugo Villeneuve Date: Sat, 25 May 2013 23:18:48 +0000 (-0400) Subject: Fixed a bug when receiving more than 1024 bytes from IMAP4 server X-Git-Tag: v1.0.0~11 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=359cf47b549e4c31bf91c3c5f6df230795a30290;p=dockapps%2Fwmnotify.git Fixed a bug when receiving more than 1024 bytes from IMAP4 server Fixed by increasing buffer from 1024 to 10240 bytes --- diff --git a/ChangeLog b/ChangeLog index 0a25943..09ad6ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ +2009-01-03 Hugo Villeneuve + Fixes a problem when receiving more than 1024 bytes + from IMAP4 server (increased buffer from 1024 to 10240 bytes). + 2006-02-19 Bobby * Replaced deprecated function OpenSSL_add_all_algorithms() with SSL_library_init(), because OpenSSL_add_all_algorithms() is no diff --git a/src/imap.c b/src/imap.c index 0e4c03e..03837c5 100644 --- a/src/imap.c +++ b/src/imap.c @@ -79,10 +79,9 @@ IMAP4_ReceiveResponse( void ) goto error; } else if( len == WMNOTIFY_BUFSIZE ) { - /* This shouldn't happen, the examine command doesn't requires that much data. */ if( wmnotify_infos.debug ) { ErrorLocation( __FILE__, __LINE__ ); - fprintf( stderr, "Response too big to fit in receive buffer.\n" ); + fprintf( stderr, "Response too big (%d bytes) to fit in receive buffer.\n", len ); } goto error; } diff --git a/src/network.h b/src/network.h index 19a9f2c..286b4dd 100644 --- a/src/network.h +++ b/src/network.h @@ -14,8 +14,8 @@ /* POP3 responses may be up to 512 characters long, including the terminating - CRLF. */ -#define WMNOTIFY_BUFSIZE 1024 + CRLF. IMAP4 responses can be more than 1024 characters. */ +#define WMNOTIFY_BUFSIZE 10240 int