diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-12-24 00:39:45 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-12-24 00:39:45 +0100 |
commit | 7a1ac642f6b9506d781c64a61e393c252b559a08 (patch) | |
tree | 3c34333c1f0858776fba518f6d637c8e41d04b50 /winsup | |
parent | 3b8372c1f2ce6546da1d71de2254c18482430e36 (diff) | |
download | newlib-7a1ac642f6b9506d781c64a61e393c252b559a08.zip newlib-7a1ac642f6b9506d781c64a61e393c252b559a08.tar.gz newlib-7a1ac642f6b9506d781c64a61e393c252b559a08.tar.bz2 |
aclfromtext: Actually return aclcnt parameter
* sec_acl.cc (aclfromtext32): Return missing aclcnt parameter.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/sec_acl.cc | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c32519e..930aa79 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2015-12-24 Corinna Vinschen <corinna@vinschen.de> + * sec_acl.cc (aclfromtext32): Return missing aclcnt parameter. + +2015-12-24 Corinna Vinschen <corinna@vinschen.de> + * sec_acl.cc (acltotext32): Use tmp_pathbuf rather than stack buffer. (aclfromtext32): Ditto. diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 348f0bc..614bc50 100644 --- a/winsup/cygwin/sec_acl.cc +++ b/winsup/cygwin/sec_acl.cc @@ -1501,7 +1501,7 @@ permfromstr (char *perm) } extern "C" aclent_t * -aclfromtext32 (char *acltextp, int *) +aclfromtext32 (const char *acltextp, int *aclcnt) { if (!acltextp || strlen (acltextp) > NT_MAX_PATH) { @@ -1610,7 +1610,11 @@ aclfromtext32 (char *acltextp, int *) } aclent_t *aclp = (aclent_t *) malloc (pos * sizeof (aclent_t)); if (aclp) - memcpy (aclp, lacl, pos * sizeof (aclent_t)); + { + memcpy (aclp, lacl, pos * sizeof (aclent_t)); + if (aclcnt) + *aclcnt = pos; + } return aclp; } |