summaryrefslogtreecommitdiff
path: root/lib/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/glob.c')
-rw-r--r--lib/glob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/glob.c b/lib/glob.c
index 33030ec72b..67530431e4 100644
--- a/lib/glob.c
+++ b/lib/glob.c
@@ -764,7 +764,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
*p = '\0';
}
else
- *((char *) mempcpy (newp, dirname + 1, end_name - dirname))
+ *((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1))
= '\0';
user_name = newp;
}