From 8d2532763981d132b02df157e4cc363c39330090 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Wed, 9 Oct 2013 16:44:30 -0700 Subject: Revert "FORTIFY_SOURCE: fortify read()" This change reverts * fb3f956d075676c0438f2ee2bf3a5be659dfc04b. * 65c99de2cb7a569ea17ca35e2f8f1e033421864b Change-Id: Id5774eeede41130579115cf67a72ee914f2b47d5 --- tests/fortify_test.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests/fortify_test.cpp') diff --git a/tests/fortify_test.cpp b/tests/fortify_test.cpp index b42c6b781..d514a3d10 100644 --- a/tests/fortify_test.cpp +++ b/tests/fortify_test.cpp @@ -21,7 +21,6 @@ #include #include #include -#include // We have to say "DeathTest" here so gtest knows to run this test (which exits) // in its own process. Unfortunately, the C preprocessor doesn't give us an @@ -569,15 +568,6 @@ TEST(DEATHTEST, FD_ZERO_fortified) { ASSERT_EXIT(FD_ZERO(set), testing::KilledBySignal(SIGABRT), ""); } -TEST(DEATHTEST, read_fortified) { - ::testing::FLAGS_gtest_death_test_style = "threadsafe"; - char buf[1]; - size_t ct = atoi("2"); // prevent optimizations - int fd = open("/dev/null", O_RDONLY); - ASSERT_EXIT(read(fd, buf, ct), testing::KilledBySignal(SIGABRT), ""); - close(fd); -} - extern "C" char* __strncat_chk(char*, const char*, size_t, size_t); extern "C" char* __strcat_chk(char*, const char*, size_t); -- cgit v1.2.3