Add stpcpy/stpncpy.
Add tests for the above.
Add the fortify implementations of __stpcpy_chk and __stpncpy_chk.
Modify the strncpy test to cover more cases and use this template for
stpncpy.
Add all of the fortify test cases.
Bug: 13746695
Change-Id: I8c0f0d4991a878b8e8734fff12c8b73b07fdd344
diff --git a/libc/Android.mk b/libc/Android.mk
index 44bf388..3eaff2f 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -96,6 +96,8 @@
bionic/__memmove_chk.cpp \
bionic/__read_chk.cpp \
bionic/__recvfrom_chk.cpp \
+ bionic/__stpcpy_chk.cpp \
+ bionic/__stpncpy_chk.cpp \
bionic/__strchr_chk.cpp \
bionic/__strlcat_chk.cpp \
bionic/__strlcpy_chk.cpp \
@@ -383,6 +385,8 @@
upstream-openbsd/lib/libc/stdlib/strtoull.c \
upstream-openbsd/lib/libc/stdlib/strtoumax.c \
upstream-openbsd/lib/libc/stdlib/system.c \
+ upstream-openbsd/lib/libc/string/stpcpy.c \
+ upstream-openbsd/lib/libc/string/stpncpy.c \
upstream-openbsd/lib/libc/string/strcasecmp.c \
upstream-openbsd/lib/libc/string/strcspn.c \
upstream-openbsd/lib/libc/string/strdup.c \