changeset 18046:53613f102450

*-login: Also increase MASTER_AUTH_MAX_DATA_SIZE and add a check to make sure it's large enough.
author Timo Sirainen <tss@iki.fi>
date Thu, 30 Oct 2014 04:41:11 +0200
parents 0a5bd3b09ca5
children 54eb3436c83b
files src/imap-login/client.c src/lib-master/master-auth.h
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap-login/client.c	Thu Oct 30 04:36:50 2014 +0200
+++ b/src/imap-login/client.c	Thu Oct 30 04:41:11 2014 +0200
@@ -23,6 +23,10 @@
 
 #include <stdlib.h>
 
+#if LOGIN_MAX_INBUF_SIZE < 1024+2
+#  error LOGIN_MAX_INBUF_SIZE too short to fit all ID command parameters
+#endif
+
 /* maximum length for IMAP command line. */
 #define MAX_IMAP_LINE 8192
 
--- a/src/lib-master/master-auth.h	Thu Oct 30 04:36:50 2014 +0200
+++ b/src/lib-master/master-auth.h	Thu Oct 30 04:41:11 2014 +0200
@@ -18,7 +18,7 @@
    values may be max. 1024 bytes plus 2 for "" quotes. (Although it could be
    even double of that when value is full of \" quotes, but for now lets not
    make it too easy to waste memory..) */
-#define MASTER_AUTH_MAX_DATA_SIZE (1024 + 128 + 33 + 2)
+#define MASTER_AUTH_MAX_DATA_SIZE (1024 + 128 + 64 + 2)
 
 #define MASTER_AUTH_ERRMSG_INTERNAL_FAILURE \
 	"Internal error occurred. Refer to server log for more information."