From 43b3fdbd8a4e2de2caeafc316cd0eb45a7b1e5ee Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Mon, 4 Jul 2016 13:33:23 -0400 Subject: [PATCH] Fixed uninitialized terminator --- mpc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mpc.c b/mpc.c index 6940d0e..be2e0cf 100644 --- a/mpc.c +++ b/mpc.c @@ -139,6 +139,7 @@ static mpc_input_t *mpc_input_new_nstring(const char *filename, const char *stri i->string = malloc(length + 1); strncpy(i->string, string, length); + i->string[length] = '\0'; i->buffer = NULL; i->file = NULL;