Ticket #412: valgrind-misalloc-with-crypt-apr1.patch
| File valgrind-misalloc-with-crypt-apr1.patch, 577 bytes (added by , 13 years ago) |
|---|
-
src/core/ngx_crypt.c
diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c index 629d160..f3844a7 100644
a b ngx_crypt_apr1(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) 137 137 138 138 /* output */ 139 139 140 *encrypted = ngx_pnalloc(pool, sizeof("$apr1$") - 1 + saltlen + 16 + 1); 140 /* $apr1$ saltlen $ md5 \0 */ 141 *encrypted = ngx_pnalloc(pool, sizeof("$apr1$") - 1 + saltlen + 1 + 4*5+2 + 1); 141 142 if (*encrypted == NULL) { 142 143 return NGX_ERROR; 143 144 }
