Skip to content

Commit

Permalink
Fixed uninitialized terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
Forty-Bot committed Jul 4, 2016
1 parent 4080345 commit 43b3fdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 43b3fdb

Please sign in to comment.