[mod_auth] compile fix for Mac OS X XCode (fixes #2772)

memcpy() may be a macro and gave error for missing arguement when
CONST_STR_LEN() macro is used (which expands to two arguments)

(thx ryandesign)

x-ref:
  "mod_authn_file.c:683:56: error: too few arguments provided to function-like macro invocation (memcpy)"
  https://redmine.lighttpd.net/issues/2772
This commit is contained in:
Glenn Strauss 2016-11-24 22:45:53 -05:00
parent 99925202dd
commit f635ae7a07
1 changed files with 1 additions and 1 deletions

View File

@ -680,7 +680,7 @@ static handler_t mod_authn_file_htpasswd_basic(server *srv, connection *con, voi
li_tohex(ntlmhex,sizeof(ntlmhex),ntlmhash,sizeof(ntlmhash));
/*(reuse sample buffer for salt (FYI: expect slen == 8))*/
memcpy(sample, CONST_STR_LEN("$1$"));
memcpy(sample, "$1$", sizeof("$1$")-1);
memcpy(sample+sizeof("$1$")-1, b, slen);
sample[sizeof("$1$")-1+slen] = '\0';
#if defined(HAVE_CRYPT_R)