You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gb...@apache.org on 2023/06/09 15:28:33 UTC

svn commit: r1910334 - /httpd/httpd/trunk/support/htdbm.c

Author: gbechis
Date: Fri Jun  9 15:28:32 2023
New Revision: 1910334

URL: http://svn.apache.org/viewvc?rev=1910334&view=rev
Log:
do not run strlen(3) on a NULL value
bz #66639

Modified:
    httpd/httpd/trunk/support/htdbm.c

Modified: httpd/httpd/trunk/support/htdbm.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htdbm.c?rev=1910334&r1=1910333&r2=1910334&view=diff
==============================================================================
--- httpd/httpd/trunk/support/htdbm.c (original)
+++ httpd/httpd/trunk/support/htdbm.c Fri Jun  9 15:28:32 2023
@@ -193,6 +193,10 @@ static apr_status_t htdbm_verify(htdbm_t
     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))