summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-13 21:34:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-11-13 21:34:07 +0000
commit6247affda263fd2d97f4dcf0f1f3c2a03d38513f (patch)
tree57cf3a8ffaaee0000bc10039e251ec1ea564a240 /sys/arch
parentc000004e8af197ebfc743eca7183bc0b012df79e (diff)
overflow fixes; netbsd
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/m68k/m68k/copy.s8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/m68k/m68k/copy.s b/sys/arch/m68k/m68k/copy.s
index f26c88b931a..75860ab8377 100644
--- a/sys/arch/m68k/m68k/copy.s
+++ b/sys/arch/m68k/m68k/copy.s
@@ -1,4 +1,4 @@
-/* $OpenBSD: copy.s,v 1.7 1997/07/06 07:46:27 downsj Exp $ */
+/* $OpenBSD: copy.s,v 1.8 1999/11/13 21:34:06 deraadt Exp $ */
/* $NetBSD: copy.s,v 1.28 1997/05/21 03:51:04 jeremy Exp $ */
/*-
@@ -249,7 +249,7 @@ ENTRY(copyinstr)
movl sp@(8),a1 | a1 = toaddr
clrl d0
movl sp@(12),d1 | count
- beq Lcisdone | nothing to copy
+ beq Lcistoolong | nothing to copy
subql #1,d1 | predecrement for dbeq
Lcisloop:
movsb a0@+,d0 | copy a byte
@@ -258,6 +258,7 @@ Lcisloop:
beq Lcisdone | copied null, exit
subil #0x10000,d1 | decrement high word of count
bcc Lcisloop | more room, keep going
+Lcistoolong:
moveq #ENAMETOOLONG,d0 | ran out of space
Lcisdone:
tstl sp@(16) | length desired?
@@ -288,7 +289,7 @@ ENTRY(copyoutstr)
movl sp@(8),a1 | a1 = toaddr
clrl d0
movl sp@(12),d1 | count
- beq Lcosdone | nothing to copy
+ beq Lcostoolong | nothing to copy
subql #1,d1 | predecrement for dbeq
Lcosloop:
movb a0@+,d0 | copy a byte
@@ -297,6 +298,7 @@ Lcosloop:
beq Lcosdone | copied null, exit
subil #0x10000,d1 | decrement high word of count
bcc Lcosloop | more room, keep going
+Lcostoolong:
moveq #ENAMETOOLONG,d0 | ran out of space
Lcosdone:
tstl sp@(16) | length desired?