summaryrefslogtreecommitdiff
path: root/src/mod_authn_file.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-08-21 16:00:46 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-08-21 16:00:46 -0400
commit3c24ec7393b85633719428c4310eab8d47427005 (patch)
tree7487d092a0237a10a7c3046260069181c74c483f /src/mod_authn_file.c
parent65efc2eda8419e4bba016df1b77783bb55c2b269 (diff)
downloadlighttpd-git-3c24ec7393b85633719428c4310eab8d47427005.tar.gz
[mod_auth] terminate salt for CRYPT-MD5-NTLM
Diffstat (limited to 'src/mod_authn_file.c')
-rw-r--r--src/mod_authn_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mod_authn_file.c b/src/mod_authn_file.c
index 33c6d48e..c3660fdb 100644
--- a/src/mod_authn_file.c
+++ b/src/mod_authn_file.c
@@ -686,6 +686,7 @@ static handler_t mod_authn_file_htpasswd_basic(server *srv, connection *con, voi
/*(reuse sample buffer for salt (FYI: expect slen == 8))*/
memcpy(sample, CONST_STR_LEN("$1$"));
memcpy(sample+sizeof("$1$")-1, b, slen);
+ sample[sizeof("$1$")-1+slen] = '\0';
#if defined(HAVE_CRYPT_R)
crypted = crypt_r(ntlmhex, sample, &crypt_tmp_data);
#else