diff options
author | Colin Walters <walters@verbum.org> | 2012-06-21 15:33:51 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2012-06-22 10:32:26 -0400 |
commit | 7d622157f055d9fb0ae3686f2b7a4fd1952af258 (patch) | |
tree | 55add2329ac368214cee0898178423e74c11032d /glib | |
parent | 56411bb67807cb5306f495d41276fe6855cdcee7 (diff) | |
download | glib-7d622157f055d9fb0ae3686f2b7a4fd1952af258.tar.gz |
tests/unix: Ensure buffer is NUL terminated
Diffstat (limited to 'glib')
-rw-r--r-- | glib/tests/unix.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/glib/tests/unix.c b/glib/tests/unix.c index 77ee61e08..9051ade0f 100644 --- a/glib/tests/unix.c +++ b/glib/tests/unix.c @@ -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]); |