]> git.kaiwu.me - nginx.git/commitdiff
fix segfault when many auth failures occurred
authorIgor Sysoev <igor@sysoev.ru>
Fri, 17 Nov 2006 08:46:34 +0000 (08:46 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 17 Nov 2006 08:46:34 +0000 (08:46 +0000)
src/imap/ngx_imap_auth_http_module.c

index 85728f46ad8527cc29c1ce81bdbc927b2b5bb183..867707f908a6cd2a3ba52f6f2b9c40867bb852fb 100644 (file)
@@ -489,10 +489,10 @@ ngx_imap_auth_http_process_headers(ngx_imap_session_t *s,
                 ctx->errmsg.data = ctx->header_start;
 
                 if (s->protocol == NGX_IMAP_POP3_PROTOCOL) {
-                    size = sizeof("-ERR") - 1 + len + sizeof(CRLF) - 1;
+                    size = sizeof("-ERR ") - 1 + len + sizeof(CRLF) - 1;
 
                 } else {
-                    size = s->tag.len + sizeof("NO") - 1 + len
+                    size = s->tag.len + sizeof("NO ") - 1 + len
                            + sizeof(CRLF) - 1;
                 }