summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-07-09 18:20:30 +0200
committerVolker Lendecke <vl@samba.org>2021-07-12 15:11:42 +0000
commit44aba9c7cabedf7b5a01fb9c5f3099125dd70602 (patch)
tree64ebc26c94789869d99534654a3f24befaeda827 /nsswitch
parentb5427f4ce54793c9ea8f91b272f21e860c21a948 (diff)
downloadsamba-44aba9c7cabedf7b5a01fb9c5f3099125dd70602.tar.gz
nsswitch: ensure the attrlist_t array is large enough for a NULL sentinel
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
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/winbind_nss_aix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nsswitch/winbind_nss_aix.c b/nsswitch/winbind_nss_aix.c
index 343809a4b34..f1f00e92a76 100644
--- a/nsswitch/winbind_nss_aix.c
+++ b/nsswitch/winbind_nss_aix.c
@@ -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;