OSDN Git Service

Add stpcpy/stpncpy.
authorChristopher Ferris <cferris@google.com>
Fri, 4 Apr 2014 21:38:18 +0000 (14:38 -0700)
committerChristopher Ferris <cferris@google.com>
Mon, 7 Apr 2014 23:41:53 +0000 (16:41 -0700)
commit950a58e24d1019eb9d814dbb16f111a6b61e3f23
tree5a91099e0ce1b9d552e7210fb914ba8d4d5ddb10
parent5f149f1bdef31d198c0e84fd8c904204d263e825
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
libc/Android.mk
libc/bionic/__stpcpy_chk.cpp [new file with mode: 0644]
libc/bionic/__stpncpy_chk.cpp [new file with mode: 0644]
libc/bionic/__strcpy_chk.cpp
libc/include/string.h
libc/private/libc_events.h
libc/upstream-openbsd/lib/libc/string/stpcpy.c [new file with mode: 0644]
libc/upstream-openbsd/lib/libc/string/stpncpy.c [new file with mode: 0644]
tests/fortify_test.cpp
tests/string_test.cpp