summaryrefslogtreecommitdiff
path: root/cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cd.c')
-rw-r--r--cd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cd.c b/cd.c
index 29aba49..a494901 100644
--- a/cd.c
+++ b/cd.c
@@ -49,7 +49,8 @@ static void cd_in_cdpath(size_t n, char p[])
static void cd_make_canonical(char *path)
{
- char tmp[strlen(path)];
+ char tmp[strlen(path) + 1];
+ strcpy(tmp, path);
/* TODO */