Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/arm32/arm32 pull up revs 1.11-1.13 from trunk ...
details: https://anonhg.NetBSD.org/src/rev/fdbe356b8a9a
branches: netbsd-1-4
changeset: 469666:fdbe356b8a9a
user: cgd <cgd%NetBSD.org@localhost>
date: Fri Nov 05 07:36:55 1999 +0000
description:
pull up revs 1.11-1.13 from trunk (requested by chs):
Fix problems in copy{,in,out}str() with zero-length buffers.
diffstat:
sys/arch/arm32/arm32/copystr.S | 32 +++++++++++++++-----------------
1 files changed, 15 insertions(+), 17 deletions(-)
diffs (85 lines):
diff -r 51c618318ed6 -r fdbe356b8a9a sys/arch/arm32/arm32/copystr.S
--- a/sys/arch/arm32/arm32/copystr.S Fri Nov 05 07:34:20 1999 +0000
+++ b/sys/arch/arm32/arm32/copystr.S Fri Nov 05 07:36:55 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: copystr.S,v 1.9 1998/06/17 20:10:39 mark Exp $ */
+/* $NetBSD: copystr.S,v 1.9.8.1 1999/11/05 07:36:55 cgd Exp $ */
/*
* Copyright (c) 1995 Mark Brinicombe.
@@ -66,12 +66,10 @@
ENTRY(copystr)
stmfd sp!, {r4-r5}
teq r2, #0x00000000
- moveq r4, #0x00000000
- moveq r5, #0x00000000
+ mov r5, #0x00000000
+ moveq r0, #ENAMETOOLONG
beq Lcopystrexit
- mov r5, #0x00000000
-
Lcopystr_loop:
ldrb r4, [r0], #0x0001
strb r4, [r1], #0x0001
@@ -80,14 +78,14 @@
teqne r5, r2
bne Lcopystr_loop
+ teq r4, #0x00000000
+ moveq r0, #0x00000000
+ movne r0, #ENAMETOOLONG
+
Lcopystrexit:
teq r3, #0x00000000
strne r5, [r3]
- teq r4, #0x00000000
- moveq r0, #0x00000000
- movne r0, #ENAMETOOLONG
-
ldmfd sp!, {r4-r5}
mov pc, lr
@@ -148,8 +146,8 @@
/* Do the actual copy */
do_copyinoutstr:
teq r2, #0x00000000
- moveq r5, #0x00000000
- moveq r6, #0x00000000
+ mov r6, #0x00000000
+ moveq r0, #ENAMETOOLONG
beq Lcopyinoutstrexit
ldr r4, Lcurpcb
@@ -162,7 +160,6 @@
add r5, pc, #Lcopystrfault - . - 8
str r5, [r4, #PCB_ONFAULT]
- mov r6, #0x00000000
Lcopyinoutstr_loop:
ldrb r5, [r0], #0x0001
@@ -172,16 +169,17 @@
teqne r6, r2
bne Lcopyinoutstr_loop
-Lcopyinoutstrexit:
- teq r3, #0x00000000
- strne r6, [r3]
+ mov r0, #0x00000000
+ str r0, [r4, #PCB_ONFAULT]
teq r5, #0x00000000
moveq r0, #0x00000000
movne r0, #ENAMETOOLONG
- mov r6, #0x00000000
- str r6, [r4, #PCB_ONFAULT]
+Lcopyinoutstrexit:
+ teq r3, #0x00000000
+ strne r6, [r3]
+
ldmfd sp!, {r4-r6}
mov pc, lr
Home |
Main Index |
Thread Index |
Old Index