summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-13 21:33:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-13 21:33:45 +0000
commitc000004e8af197ebfc743eca7183bc0b012df79e (patch)
tree9e6c7d69c2db29b33d7e7c36897362892ff663c2 /sys
parent484b04e91e4385a2f1d849fc8c9ff35df432dfec (diff)
overflow fixes; chuq
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/alpha/alpha/locore.s8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/alpha/alpha/locore.s b/sys/arch/alpha/alpha/locore.s
index e7ed78d46bb..5567c507053 100644
--- a/sys/arch/alpha/alpha/locore.s
+++ b/sys/arch/alpha/alpha/locore.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.s,v 1.10 1999/09/26 11:07:32 kstailey Exp $ */
+/* $OpenBSD: locore.s,v 1.11 1999/11/13 21:33:44 deraadt Exp $ */
/* $NetBSD: locore.s,v 1.27 1996/12/03 19:54:16 cgd Exp $ */
/*
@@ -858,7 +858,9 @@ LEAF(copystr, 4)
LDGP(pv)
mov a2, t0 /* t0 = i = len */
- beq a2, Lcopystr2 /* if (len == 0), bail out */
+ bne a2, Lcopystr1 /* if (len != 0), proceed */
+ ldiq t1, 1 /* else bail */
+ br zero, Lcopystr2
Lcopystr1:
ldq_u t1, 0(a0) /* t1 = *from */
@@ -882,7 +884,7 @@ Lcopystr2:
Lcopystr3:
beq t1, Lcopystr4 /* *from == '\0'; leave quietly */
- ldiq v0, ENAMETOOLONG /* *from != '\0'; error. */
+ ldiq v0, ENAMETOOLONG /* *from != '\0'; error. */
RET
Lcopystr4: