about summary refs log tree commit diff
path: root/libio/tst-fwrite-error.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-15 11:35:43 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-15 11:35:43 +0530
commit5cb26d0aed9c7414f0d391a0ca766786625de8b5 (patch)
tree5dc9bd95f370d870d8e2849d7114c69a7306fadd /libio/tst-fwrite-error.c
parentacb4325fc72d5eeecf3cf3fe63c599e582bb3bd0 (diff)
downloadglibc-5cb26d0aed9c7414f0d391a0ca766786625de8b5.tar.gz
glibc-5cb26d0aed9c7414f0d391a0ca766786625de8b5.tar.xz
glibc-5cb26d0aed9c7414f0d391a0ca766786625de8b5.zip
Fix off-by-one bug in tst-fwrite-error
tst-fwrite-error did not allocate enough space for the string 'world'
and its NULL terminator.  Fixed.
Diffstat (limited to 'libio/tst-fwrite-error.c')
-rw-r--r--libio/tst-fwrite-error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/tst-fwrite-error.c b/libio/tst-fwrite-error.c
index e2507effe7..87c876627e 100644
--- a/libio/tst-fwrite-error.c
+++ b/libio/tst-fwrite-error.c
@@ -36,7 +36,7 @@ do_test (void)
       return 1;
     }
 
-  char buf[5] = "world";
+  char buf[] = "world";
   setvbuf (fp, NULL, _IONBF, 0);
   close (fd);
   unlink (tmpl);