diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_copy.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/tests/test_copy.c b/tests/test_copy.c index 14310e4..b37b1d3 100644 --- a/tests/test_copy.c +++ b/tests/test_copy.c @@ -18,7 +18,7 @@ void test_copy() {      for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) {          struct stat st_a, st_b;          struct testcase *test = &tc[i]; -        char *mock_data = malloc(test->expect_size * sizeof(*mock_data)); +        char *mock_data = malloc(test->expect_size + 1 * sizeof(*mock_data));          memset(mock_data, 'A', test->expect_size);          mock_data[test->expect_size] = '\0';          stasis_testing_write_ascii(test->in_file, mock_data); | 
