add fortified implementations of send/sendto
Bug: None
Test: Bullhead builds+boots; CtsBionicTestCases passes.
Change-Id: I2f137a100f679f7f2145d84b2f29ddd3e96a36ae
diff --git a/tests/fortify_test.cpp b/tests/fortify_test.cpp
index e1ff769..86b282c 100644
--- a/tests/fortify_test.cpp
+++ b/tests/fortify_test.cpp
@@ -623,6 +623,12 @@
ASSERT_FORTIFY(recv(0, buf, data_len, 0));
}
+TEST_F(DEATHTEST, send_fortified) {
+ size_t data_len = atoi("11"); // suppress compiler optimizations
+ char buf[10] = {0};
+ ASSERT_FORTIFY(send(0, buf, data_len, 0));
+}
+
TEST_F(DEATHTEST, FD_ISSET_fortified) {
#if defined(__BIONIC__) // glibc catches this at compile-time.
fd_set set;