Skip to content

Commit

Permalink
Merge pull request orangeduck#57 from Forty-Bot/master
Browse files Browse the repository at this point in the history
Fixed uninitialized terminator
  • Loading branch information
orangeduck authored Jul 4, 2016
2 parents 4080345 + 43b3fdb commit 724e9a3
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 724e9a3

Please sign in to comment.