aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rcynic/rcynic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rcynic/rcynic.c b/rcynic/rcynic.c
index ea4ffe83..bcf42be2 100644
--- a/rcynic/rcynic.c
+++ b/rcynic/rcynic.c
@@ -466,7 +466,7 @@ static void set_directory(char **out, const char *in)
assert(in && out);
n = strlen(in);
need_slash = in[n - 1] != '/';
- s = malloc(n + need_slash);
+ s = malloc(n + need_slash + 1);
assert(s != NULL);
strcpy(s, in);
if (need_slash)