Merge pull request #57 from Forty-Bot/master

Fixed uninitialized terminator
This commit is contained in:
Daniel Holden
2016-07-04 18:36:42 +01:00
committed by GitHub

1
mpc.c
View File

@@ -139,6 +139,7 @@ static mpc_input_t *mpc_input_new_nstring(const char *filename, const char *stri
i->string = malloc(length + 1); i->string = malloc(length + 1);
strncpy(i->string, string, length); strncpy(i->string, string, length);
i->string[length] = '\0';
i->buffer = NULL; i->buffer = NULL;
i->file = NULL; i->file = NULL;