summaryrefslogtreecommitdiffstats
path: root/support/htdbm.c
diff options
context:
space:
mode:
authorGiovanni Bechis <gbechis@apache.org>2023-06-09 17:28:32 +0200
committerGiovanni Bechis <gbechis@apache.org>2023-06-09 17:28:32 +0200
commitb570a7f4900982f99852f9b49f7fde87ff7db099 (patch)
tree7912023e55cfc51c4bff2ac3d4049849a3073e27 /support/htdbm.c
parent *) mod_http2: fixed a bug in flushing pending data on an already closed (diff)
downloadapache2-b570a7f4900982f99852f9b49f7fde87ff7db099.tar.xz
apache2-b570a7f4900982f99852f9b49f7fde87ff7db099.zip
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
Diffstat (limited to 'support/htdbm.c')
-rw-r--r--support/htdbm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/htdbm.c b/support/htdbm.c
index c2f8f3f01a..5cbd3f2639 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))