From 8cbbfb7e58e95977333ded04252b0519e0312026 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Sun, 24 Jan 2016 21:04:48 +0900 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/openat-proc.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 59d2f245e7..ea537130ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-24 KO Myung-Hun + + 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 regex: treat [x] as x if x is a unibyte encoding error diff --git a/lib/openat-proc.c b/lib/openat-proc.c index 6fba6c2bbf..1712340a00 100644 --- a/lib/openat-proc.c +++ b/lib/openat-proc.c @@ -125,7 +125,7 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file) } strcpy (result, dir); - result[dirlen] = '/'; + result[dirlen++] = '/'; } #endif -- 2.39.5