diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/httpd/src/modules/keynote/mod_keynote.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/httpd/src/modules/keynote/mod_keynote.c b/usr.sbin/httpd/src/modules/keynote/mod_keynote.c index e21ec7e2153..892da6adfdb 100644 --- a/usr.sbin/httpd/src/modules/keynote/mod_keynote.c +++ b/usr.sbin/httpd/src/modules/keynote/mod_keynote.c @@ -705,6 +705,8 @@ check_keynote_assertions(request_rec *r) /* Add username as a principal too. */ if (r->connection->user != NULL) { + int n; + authLen = strlen(r->connection->user) + 1 + strlen("username:"); pwauth = calloc(authLen, sizeof(char)); if (pwauth == NULL) { @@ -712,7 +714,7 @@ check_keynote_assertions(request_rec *r) goto done; } - int n = snprintf(pwauth, authLen, "username:%s", + n = snprintf(pwauth, authLen, "username:%s", r->connection->user); if (n == -1 || n >= authLen) { rval = FORBIDDEN; |