[newlib-cygwin/topic/posix_acl_funcs] __acltotext: Always append NUL

Corinna Vinschen corinna@sourceware.org
Wed Jan 27 14:56:00 GMT 2016


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=73acbc8ae561271e16247cddcbbad7de058ae183

commit 73acbc8ae561271e16247cddcbbad7de058ae183
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Jan 6 21:05:56 2016 +0100

    __acltotext: Always append NUL
    
    	* sec_acl.cc (__acltotext): Append NUL unconditionally.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/sec_acl.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 73c0425..6e5ccb2 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1687,8 +1687,8 @@ __acltotext (aclent_t *aclbufp, int aclcnt, const char *prefix, char separator,
     {
       _CHK (1);
       *bufp++ = separator;
-      *bufp++ = '\0';
     }
+  *bufp = '\0';
   return strdup (buf);
 }



More information about the Cygwin-cvs mailing list