diff options
Diffstat (limited to 'src/stdlib')
-rw-r--r-- | src/stdlib/relpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/relpath.c b/src/stdlib/relpath.c index bd9e733..93daad9 100644 --- a/src/stdlib/relpath.c +++ b/src/stdlib/relpath.c @@ -57,7 +57,7 @@ char* relpath(const char* file, const char* ref) /* XXX may also fail as get_cur if (absref == NULL) { p = strlen(cwd); - absref = malloc((p + 1) * sizeof(char)); + absref = malloc((p + 2) * sizeof(char)); if (absref == NULL) goto fail; memcpy(absref, cwd, p); |