瀏覽代碼

bump IMAP command buffer size to 4KiB

while only 1KiB is required by the IMAP spec, AUTHENTICATE GSSAPI with
Kerberos requires about 1700 bytes.
accomodate that, plus some reserve.

fix suggested by Tollef Fog Heen <tfheen@err.no> via Debian BTS.
Oswald Buddenhagen 6 年之前
父節點
當前提交
f7cec3064d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/drv_imap.c

+ 2 - 2
src/drv_imap.c

@@ -287,7 +287,7 @@ send_imap_cmd( imap_store_t *ctx, imap_cmd_t *cmd )
 	int bufl, litplus, iovcnt = 1;
 	const char *buffmt;
 	conn_iovec_t iov[3];
-	char buf[1024];
+	char buf[4096];
 
 	cmd->tag = ++ctx->nexttag;
 	if (!cmd->param.data) {
@@ -444,7 +444,7 @@ imap_vprintf( const char *fmt, va_list ap )
 	char *d, *ed;
 	int maxlen;
 	char c;
-	char buf[1024]; /* Minimal supported command buffer size per IMAP spec. */
+	char buf[4096];
 
 	d = buf;
 	ed = d + sizeof(buf);