Skip to content

Commit

Permalink
utils: Fix out-of-bounds write
Browse files Browse the repository at this point in the history
  • Loading branch information
jtojnar committed Aug 25, 2019
1 parent 822b5dd commit fd37ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mutest-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ string_split (const char *str,
indent[indent_len] = '\0';
}

char *res = malloc (sizeof (char) * len);
char *res = malloc (sizeof (char) * len + 1);
if (mutest_unlikely (res == NULL))
mutest_oom_abort ();

Expand Down

0 comments on commit fd37ed9

Please sign in to comment.