From: Giovanni Bechis Date: Fri, 9 Jun 2023 15:28:32 +0000 (+0000) Subject: do not run strlen(3) on a NULL value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b570a7f4900982f99852f9b49f7fde87ff7db099;p=thirdparty%2Fapache%2Fhttpd.git do not run strlen(3) on a NULL value bz #66639 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910334 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htdbm.c b/support/htdbm.c index c2f8f3f01a7..5cbd3f26393 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -193,6 +193,10 @@ static apr_status_t htdbm_verify(htdbm_t *htdbm) char *pwd; char *rec, *cmnt; + if(htdbm->username == NULL) { + return APR_ENOENT; + } + key.dptr = htdbm->username; key.dsize = strlen(htdbm->username); if (!apr_dbm_exists(htdbm->dbm, key))