1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3:vfs_gpfs: add no memory check in gpfs2smb_acl()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 28 14:06:27 CET 2012 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2012-11-28 11:44:58 +01:00 committed by Michael Adam
parent 0f630abb3f
commit bc6bceec65

View File

@ -575,6 +575,11 @@ static SMB_ACL_T gpfs2smb_acl(const struct gpfs_acl *pacl, TALLOC_CTX *mem_ctx)
result->count = pacl->acl_nace;
result->acl = talloc_realloc(result, result->acl, struct smb_acl_entry,
result->count);
if (result->acl == NULL) {
TALLOC_FREE(result);
errno = ENOMEM;
return NULL;
}
for (i=0; i<pacl->acl_nace; i++) {
struct smb_acl_entry *ace = &result->acl[i];