From: Yann Ylavic Date: Fri, 3 Feb 2017 09:11:03 +0000 (+0000) Subject: htpasswd: report the right limit when get_password() overflows. X-Git-Tag: 2.5.0-alpha~705 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6b7f4310e718a93c80bd48702db03658469094e9;p=thirdparty%2Fapache%2Fhttpd.git htpasswd: report the right limit when get_password() overflows. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781516 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/passwd_common.c b/support/passwd_common.c index 113236c3992..664e509b956 100644 --- a/support/passwd_common.c +++ b/support/passwd_common.c @@ -168,7 +168,7 @@ int get_password(struct passwd_ctx *ctx) err_too_long: ctx->errstr = apr_psprintf(ctx->pool, "password too long (>%" APR_SIZE_T_FMT ")", - ctx->out_len - 1); + sizeof(buf) - 1); return ERR_OVERFLOW; }