diff options
Diffstat (limited to 'debug/tst-chk1.c')
-rw-r--r-- | debug/tst-chk1.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c index 9c9f82a3af..e01284ae53 100644 --- a/debug/tst-chk1.c +++ b/debug/tst-chk1.c @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <fcntl.h> #include <setjmp.h> #include <signal.h> #include <stdio.h> @@ -106,6 +107,10 @@ do_test (void) sigaction (SIGABRT, &sa, NULL); + /* Avoid all the buffer overflow messages on stderr. */ + close (STDERR_FILENO); + open ("/dev/null", O_WRONLY); + struct A { char buf1[9]; char buf2[1]; } a; printf ("Test checking routines at fortify level %d\n", |