Module Name:    src
Committed By:   matt
Date:           Thu Jan 10 04:51:49 UTC 2013

Modified Files:
        src/common/lib/libc/arch/arm/string: strcpy_arm.S

Log Message:
Fix a typo in strlcpy which caused to not deal with NULs predecing the
string properly.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/string/strcpy_arm.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/arm/string/strcpy_arm.S
diff -u src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.1 src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.2
--- src/common/lib/libc/arch/arm/string/strcpy_arm.S:1.1	Tue Jan  8 13:17:45 2013
+++ src/common/lib/libc/arch/arm/string/strcpy_arm.S	Thu Jan 10 04:51:49 2013
@@ -29,7 +29,7 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: strcpy_arm.S,v 1.1 2013/01/08 13:17:45 matt Exp $")
+RCSID("$NetBSD: strcpy_arm.S,v 1.2 2013/01/10 04:51:49 matt Exp $")
 
 #ifdef STRLCPY
 #ifdef _LIBC
@@ -224,10 +224,10 @@ ENTRY(FUNCNAME)
 	 * fill the bytes in the word we don't want to match with all 1s.
 	 */
 	mvn	r3, #0			/* create a mask */
-	mov	r3, r3, lslo r8		/* zero out byte being kept */
-	orr	r3, r3, r5		/* merge src and mask */
+	mov	r3, r3, lslo r8		/* zero out bytes being kept */
+	orr	r5, r5, r3		/* merge src and mask */
 #ifdef _ARM_ARCH_6
-	uqadd8	r3, r3, r7		/* NUL detection magic happens */
+	uqadd8	r3, r5, r7		/* NUL detection magic happens */
 	mvns	r3, r3			/* is the complemented result 0? */
 	beq	.Lincongruent_mainloop_load /*   yes, no NUL encountered! */
 #ifdef __ARMEL__

Reply via email to