mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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
This commit is contained in:
parent
b5427f4ce5
commit
44aba9c7ca
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user