Beispiel #1
0
void printf(const char *fmt, ...) {
  char b[512];
  va_list args;
  va_start(args, fmt);

  tty_set_text_color(0xf);

  vsprintf_helper(b, fmt, args);

  va_end(args);
  puts(b);
}
TEST(DEATHTEST, vsprintf2_fortified) {
  ::testing::FLAGS_gtest_death_test_style = "threadsafe";
  ASSERT_EXIT(vsprintf_helper("0123456789"), testing::KilledBySignal(SIGABRT), "");
}