From: Siddhesh Poyarekar Date: Mon, 15 Apr 2013 06:05:43 +0000 (+0530) Subject: Fix off-by-one bug in tst-fwrite-error X-Git-Tag: glibc-2.18~406 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cb26d0aed9c7414f0d391a0ca766786625de8b5;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index b80865e7dfe..ac1d2637a09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2013-04-15 Siddhesh Poyarekar + * libio/tst-fwrite-error.c (do_test): Fix BUF array definition. + * benchtests/Rules (bench-deps): Collect dependencies into a single variable. Add Makefile to dependencies. ($(objpfx)bench-%.c): Depend on bench-deps. diff --git a/libio/tst-fwrite-error.c b/libio/tst-fwrite-error.c index e2507effe76..87c876627eb 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);