]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/aaa/mod_authnz_ldap.c (create_authnz_ldap_dir_config): Fix allocation
authorJoe Orton <jorton@apache.org>
Wed, 20 Nov 2024 10:23:03 +0000 (10:23 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 20 Nov 2024 10:23:03 +0000 (10:23 +0000)
  of sgAttributes, found by gcc -fanalyzer:

modules/aaa/mod_authnz_ldap.c: scope_hint: In function 'create_authnz_ldap_dir_config'
modules/aaa/mod_authnz_ldap.c:356:23: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921971 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authnz_ldap.c

index 3ff62fd0320d19106f19443724797dfd91443307..888e68fe135ca95dc0bd64551e5af1c815870f37 100644 (file)
@@ -355,7 +355,7 @@ static void *create_authnz_ldap_dir_config(apr_pool_t *p, char *d)
     sec->group_attrib_is_dn = 1;
     sec->secure = -1;   /*Initialize to unset*/
     sec->maxNestingDepth = 0;
-    sec->sgAttributes = apr_pcalloc(p, sizeof (char *) * GROUPATTR_MAX_ELTS + 1);
+    sec->sgAttributes = apr_pcalloc(p, sizeof (char *) * (GROUPATTR_MAX_ELTS + 1));
 
     sec->user_is_dn = 0;
     sec->remote_user_attribute = NULL;