mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
tests/unix: Ensure buffer is NUL terminated
This commit is contained in:
parent
56411bb678
commit
7d622157f0
@ -43,6 +43,7 @@ test_pipe (void)
|
||||
memset (buf, 0, sizeof (buf));
|
||||
bytes_read = read (pipefd[0], buf, sizeof(buf) - 1);
|
||||
g_assert_cmpint (bytes_read, >, 0);
|
||||
buf[bytes_read] = '\0';
|
||||
|
||||
close (pipefd[0]);
|
||||
close (pipefd[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user