projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56411bb
)
tests/unix: Ensure buffer is NUL terminated
author
Colin Walters
<walters@verbum.org>
Thu, 21 Jun 2012 19:33:51 +0000
(15:33 -0400)
committer
Colin Walters
<walters@verbum.org>
Fri, 22 Jun 2012 14:32:26 +0000
(10:32 -0400)
glib/tests/unix.c
patch
|
blob
|
history
diff --git
a/glib/tests/unix.c
b/glib/tests/unix.c
index
77ee61e
..
9051ade
100644
(file)
--- 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]);