test: null terminate output buffers

Previously, the standard i/o stream and daemon logs
were not properly null terminated, which could cause
issues in `print_lines()` inside `log_test_result()`.

See #1710
This commit is contained in:
Barnabás Pőcze 2021-12-01 10:35:59 +01:00
parent 921a9038e1
commit 3d152db758

View file

@ -996,6 +996,12 @@ error:
}
}
for (size_t i = 0; i < SPA_N_ELEMENTS(t->logs); i++) {
char *e = pw_array_add(&t->logs[i], 1);
spa_assert_se(e);
*e = '\0';
}
close_pipes(read_fds);
close_pipes(write_fds);