summaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_user.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-11-29 15:29:38 +0000
committerJonathan Kolb <jon@b0g.us>2010-11-29 15:29:38 +0000
commit3f13cc6b2c2c6f71bcaa8b1e3a2e2190db6d852f (patch)
tree2ee4bc413b131dd56b1849f26bcc489da97750c3 /src/os/unix/ngx_user.c
parentdf5fa5fcb16c6fd65657add97be5f056b58afa36 (diff)
downloadnginx-0.9.0.tar.gz
Changes with nginx 0.9.0 29 Nov 2010v0.9.0
*) Feature: the "keepalive_disable" directive. *) Feature: the "map" directive supports variables as value of a defined variable. *) Feature: the "map" directive supports empty strings as value of the first parameter. *) Feature: the "map" directive supports expressions as the first parameter. *) Feature: nginx(8) manual page. Thanks to Sergey Osokin. *) Feature: Linux accept4() support. Thanks to Simon Liu. *) Workaround: elimination of Linux linker warning about "sys_errlist" and "sys_nerr"; the warning had appeared in 0.8.35. *) Bugfix: a segmentation fault might occur in a worker process, if the "auth_basic" directive was used. Thanks to Michail Laletin. *) Bugfix: compatibility with ngx_http_eval_module; the bug had appeared in 0.8.42.
Diffstat (limited to 'src/os/unix/ngx_user.c')
-rw-r--r--src/os/unix/ngx_user.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c
index 4bad1c307..165c6a46b 100644
--- a/src/os/unix/ngx_user.c
+++ b/src/os/unix/ngx_user.c
@@ -41,11 +41,11 @@ ngx_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
err = ngx_errno;
if (err == 0) {
- len = ngx_strlen(value);
+ len = ngx_strlen(value) + 1;
*encrypted = ngx_pnalloc(pool, len);
if (*encrypted) {
- ngx_memcpy(*encrypted, value, len + 1);
+ ngx_memcpy(*encrypted, value, len);
return NGX_OK;
}
}
@@ -79,11 +79,11 @@ ngx_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
value = crypt((char *) key, (char *) salt);
if (value) {
- len = ngx_strlen(value);
+ len = ngx_strlen(value) + 1;
*encrypted = ngx_pnalloc(pool, len);
if (*encrypted) {
- ngx_memcpy(*encrypted, value, len + 1);
+ ngx_memcpy(*encrypted, value, len);
}
#if (NGX_THREADS && NGX_NONREENTRANT_CRYPT)