]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nsswitch: ensure the attrlist_t array is large enough for a NULL sentinel
authorRalph Boehme <slow@samba.org>
Fri, 9 Jul 2021 16:20:30 +0000 (18:20 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 12 Jul 2021 15:11:42 +0000 (15:11 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14754

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jul 12 15:11:42 UTC 2021 on sn-devel-184

nsswitch/winbind_nss_aix.c

index 343809a4b34c52685f1034b81a84dc33c7dadef9..f1f00e92a761328eccb32baeeceadf55de08c814 100644 (file)
@@ -833,7 +833,7 @@ static attrlist_t **wb_aix_attrlist(void)
        logit("method attrlist called\n");
 
        n = sizeof(attr_list) / sizeof(struct attr_types);
-       size = (n*sizeof(attrlist_t *));
+       size = ((n + 1) * sizeof(attrlist_t *));
 
        if ( (ret = malloc( size )) == NULL ) {
                errno = ENOMEM;