aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index fd00a76..69b670b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
for (int i = 0; i < argc; i++)
n += strlen(*argv+i);
- if ((str = malloc(n + 1)) == NULL) {
+ if ((str = malloc(n + 4 * argc + 1)) == NULL) {
perror("main: malloc failed");
exit(EXIT_FAILURE);
}