Mercurial > hg > nginx
comparison src/imap/ngx_imap_auth_http_module.c @ 854:1673f197bc62
fix segfault when many auth failures occurred
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 17 Nov 2006 08:46:34 +0000 |
parents | da9c1521319d |
children | 0197d6aae54e |
comparison
equal
deleted
inserted
replaced
853:a7c8cbb4c55f | 854:1673f197bc62 |
---|---|
487 | 487 |
488 ctx->errmsg.len = len; | 488 ctx->errmsg.len = len; |
489 ctx->errmsg.data = ctx->header_start; | 489 ctx->errmsg.data = ctx->header_start; |
490 | 490 |
491 if (s->protocol == NGX_IMAP_POP3_PROTOCOL) { | 491 if (s->protocol == NGX_IMAP_POP3_PROTOCOL) { |
492 size = sizeof("-ERR") - 1 + len + sizeof(CRLF) - 1; | 492 size = sizeof("-ERR ") - 1 + len + sizeof(CRLF) - 1; |
493 | 493 |
494 } else { | 494 } else { |
495 size = s->tag.len + sizeof("NO") - 1 + len | 495 size = s->tag.len + sizeof("NO ") - 1 + len |
496 + sizeof(CRLF) - 1; | 496 + sizeof(CRLF) - 1; |
497 } | 497 } |
498 | 498 |
499 p = ngx_pcalloc(s->connection->pool, size); | 499 p = ngx_pcalloc(s->connection->pool, size); |
500 if (p == NULL) { | 500 if (p == NULL) { |