From: Arne Wiebalck Date: Fri, 7 Feb 2014 11:37:57 +0000 (+0100) Subject: libacl: use initialized memory X-Git-Tag: upstream/1.8.0_pre1^2~793 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b490cfd240021d072a3fe8e2ec2a21f218baf5ae;p=packages%2Fo%2Fopenafs.git libacl: use initialized memory Replace malloc with calloc to use zeroed memory when converting access lists. Change-Id: I17558d1737fee020772919e423c9fba37180beca Reviewed-on: http://gerrit.openafs.org/10815 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman --- diff --git a/src/libacl/aclprocs.c b/src/libacl/aclprocs.c index d963c78ae..d4c3f8c4c 100644 --- a/src/libacl/aclprocs.c +++ b/src/libacl/aclprocs.c @@ -253,7 +253,7 @@ acl_Internalize_pr(int (*func)(namelist *names, idlist *ids), char *elist, struc return 0; } lnames.namelist_len = (*acl)->total; - lnames.namelist_val = malloc(lnames.namelist_len * PR_MAXNAMELEN); + lnames.namelist_val = calloc(lnames.namelist_len, PR_MAXNAMELEN); if (lnames.namelist_val == 0) { return -1; }