changeset 37909:3686845e645c

openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC * lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after copying a directory.
author KO Myung-Hun <komh78@gmail.com>
date Sun, 24 Jan 2016 21:04:48 +0900
parents 3efd6ed98abb
children 73dceabe6377
files ChangeLog lib/openat-proc.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 24 00:55:44 2016 -0800
+++ b/ChangeLog	Sun Jan 24 21:04:48 2016 +0900
@@ -1,3 +1,9 @@
+2016-01-24  KO Myung-Hun  <komh78@gmail.com>
+
+	openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
+	* lib/openat-proc.c (openat_proc_name): Increase dirlen by 1 after
+	copying a directory.
+
 2016-01-24  Paul Eggert  <eggert@cs.ucla.edu>
 
 	regex: treat [x] as x if x is a unibyte encoding error
--- a/lib/openat-proc.c	Sun Jan 24 00:55:44 2016 -0800
+++ b/lib/openat-proc.c	Sun Jan 24 21:04:48 2016 +0900
@@ -125,7 +125,7 @@
       }
 
     strcpy (result, dir);
-    result[dirlen] = '/';
+    result[dirlen++] = '/';
   }
 #endif