diff --git a/src/parse.c b/src/parse.c index 2daf97c..280e800 100644 --- a/src/parse.c +++ b/src/parse.c @@ -19,6 +19,7 @@ void add_arg(struct Args *args, char *arg_ptr, unsigned int arg_length) { char *arg = malloc(arg_length + 1); strncpy(arg, arg_ptr, arg_length); + arg[arg_length] = '\0'; args->argv[args->argc] = arg; args->argc++;