__memcpy_chk: Fix signed cmp of unsigned values.
I accidentally did a signed comparison of the size_t values passed in
for three of the _chk functions. Changing them to unsigned compares.
Add three new tests to verify this failure is fixed.
Bug: 10691831
Merge from internal master.
(cherry-picked from 883ef2499c2ff76605f73b1240f719ca6282e554)
Change-Id: Id9a96b549435f5d9b61dc132cf1082e0e30889f5
diff --git a/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S b/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S
index 1224b49..05152e6 100644
--- a/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S
+++ b/libc/arch-arm/cortex-a15/bionic/__strcpy_chk.S
@@ -151,7 +151,7 @@
pld [r1, #64]
ldr r0, [sp]
cmp r3, lr
- bge __strcpy_chk_failed
+ bhs __strcpy_chk_failed
// Add 1 for copy length to get the string terminator.
add r2, r3, #1