diff options
Diffstat (limited to '')
-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 f710523..bd9e733 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 + 1) * sizeof(char)); if (absref == NULL) goto fail; memcpy(absref, cwd, p); |