This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] __acltotext: Always append NUL


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

commit 3d88f10983e6517a2e8993a2ada0b3fd335f3c61
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 052856f..3993249 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -1699,8 +1699,8 @@ __acltotext (aclent_t *aclbufp, int aclcnt, const char *prefix, char separator,
     {
       _CHK (1);
       *bufp++ = separator;
-      *bufp++ = '\0';
     }
+  *bufp = '\0';
   return strdup (buf);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]