Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-10]: src/common/lib/libc/arch/arm/string Pull up following revisi...
details: https://anonhg.NetBSD.org/src/rev/7643301877e1
branches: netbsd-10
changeset: 373113:7643301877e1
user: martin <martin%NetBSD.org@localhost>
date: Thu Jan 19 10:35:39 2023 +0000
description:
Pull up following revision(s) (requested by skrll in ticket #51):
common/lib/libc/arch/arm/string/strlen_arm.S: revision 1.11
Fix strnlen with a large maxlen argument by using unsigned comparison
conditions - from mlelstv.
I had a similar, but not quite as good patch.
diffstat:
common/lib/libc/arch/arm/string/strlen_arm.S | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r fae6be11f62a -r 7643301877e1 common/lib/libc/arch/arm/string/strlen_arm.S
--- a/common/lib/libc/arch/arm/string/strlen_arm.S Wed Jan 18 19:23:38 2023 +0000
+++ b/common/lib/libc/arch/arm/string/strlen_arm.S Thu Jan 19 10:35:39 2023 +0000
@@ -29,7 +29,7 @@
#include <machine/asm.h>
-RCSID("$NetBSD: strlen_arm.S,v 1.10 2022/12/03 11:34:38 skrll Exp $")
+RCSID("$NetBSD: strlen_arm.S,v 1.10.2.1 2023/01/19 10:35:39 martin Exp $")
#if defined(__thumb__) && !defined(_ARM_ARCH_T2)
#error Only Thumb2 or ARM supported
@@ -102,7 +102,7 @@
.Lmain_loop:
#ifdef STRNLEN
cmp r0, r5 /* gone too far? */
- bge .Lmaxed_out /* yes, return maxlen */
+ bhs .Lmaxed_out /* yes, return maxlen */
#endif
ldr r3, [r0], #4 /* load next word */
#if defined(_ARM_ARCH_6)
@@ -164,9 +164,9 @@
#ifdef STRNLEN
cmp r0, r4 /* is it larger than maxlen? */
#ifdef __thumb__
- it gt
+ it hi
#endif
- movgt r0, r4 /* yes, return maxlen */
+ movhi r0, r4 /* yes, return maxlen */
pop {r4, r5} /* restore registers */
#endif
RET /* return */
Home |
Main Index |
Thread Index |
Old Index