am b9aab3a4: am 8c00c91a: Merge "add strrchr -D_FORTIFY_SOURCE=2 test."

* commit 'b9aab3a462efb79cdae83d9b819e299216f9cf5f':
  add strrchr -D_FORTIFY_SOURCE=2 test.
This commit is contained in:
Nick Kralevich 2013-05-01 15:11:32 -07:00 committed by Android Git Automerger
commit 874ea191de

View File

@ -44,6 +44,17 @@ TEST(Fortify2_DeathTest, sprintf_fortified2) {
testing::KilledBySignal(SIGSEGV), "");
}
#if __BIONIC__
TEST(Fortify2_DeathTest, strrchr2) {
::testing::FLAGS_gtest_death_test_style = "threadsafe";
foo myfoo;
memcpy(myfoo.a, "0123456789", 10);
memcpy(myfoo.b, "01234", 6);
ASSERT_EXIT(printf("%s", strrchr(myfoo.a, 'a')),
testing::KilledBySignal(SIGSEGV), "");
}
#endif
/***********************************************************/
/* TESTS BELOW HERE DUPLICATE TESTS FROM fortify1_test.cpp */
/***********************************************************/