diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 23:17:14 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-18 23:17:14 +0100 |
commit | 6b0b5bd2ad07b1bea710d304c3cee3f28720d7ba (patch) | |
tree | 8c252574ef13533db05b6bac13b812bef46d9748 | |
parent | we need signed integer representation conversion (diff) | |
download | slibc-6b0b5bd2ad07b1bea710d304c3cee3f28720d7ba.tar.gz slibc-6b0b5bd2ad07b1bea710d304c3cee3f28720d7ba.tar.bz2 slibc-6b0b5bd2ad07b1bea710d304c3cee3f28720d7ba.tar.xz |
fix issue #7 on github
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
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); |