Implement __memset_chk as a copy & paste of __memcpy_chk.
These two will stay behind when we move memcpy()/memmove()/memset() over
to arm-optimized-routines (which leaves fortify to us).
Test: treehugger
Change-Id: Ie683f71a5a141263ce3f4e8811df9eaf667584f4
diff --git a/libc/bionic/fortify.cpp b/libc/bionic/fortify.cpp
index 88ae477..4317a56 100644
--- a/libc/bionic/fortify.cpp
+++ b/libc/bionic/fortify.cpp
@@ -489,14 +489,14 @@
return strcpy(dst, src);
}
-#if !defined(NO___MEMCPY_CHK)
+#if !defined(HAVE_ASSEMBLER___MEMCPY_CHK)
// Runtime implementation of __memcpy_chk (used directly by compiler, not in headers).
extern "C" void* __memcpy_chk(void* dst, const void* src, size_t count, size_t dst_len) {
__check_count("memcpy", "count", count);
__check_buffer_access("memcpy", "write into", count, dst_len);
return memcpy(dst, src, count);
}
-#endif // NO___MEMCPY_CHK
+#endif
// Runtime implementation of __mempcpy_chk (used directly by compiler, not in headers).
extern "C" void* __mempcpy_chk(void* dst, const void* src, size_t count, size_t dst_len) {