Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libkern/arch/sh5 Doh. Bail out early if we're passed...



details:   https://anonhg.NetBSD.org/src/rev/5f2a7deba666
branches:  trunk
changeset: 538399:5f2a7deba666
user:      scw <scw%NetBSD.org@localhost>
date:      Sat Oct 19 08:53:45 2002 +0000

description:
Doh. Bail out early if we're passed a zero-length buffer.

diffstat:

 sys/lib/libkern/arch/sh5/memset.S |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 0c3600e548e3 -r 5f2a7deba666 sys/lib/libkern/arch/sh5/memset.S
--- a/sys/lib/libkern/arch/sh5/memset.S Sat Oct 19 08:50:30 2002 +0000
+++ b/sys/lib/libkern/arch/sh5/memset.S Sat Oct 19 08:53:45 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: memset.S,v 1.1 2002/10/17 11:53:33 scw Exp $   */
+/*     $NetBSD: memset.S,v 1.2 2002/10/19 08:53:45 scw Exp $   */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -58,6 +58,7 @@
 #endif
        mshflo.b r3, r3, r3
        ptabs/u r18, tr0
+       beq/u   r4, r63, tr0            /* Bail now if "bytes" is zero */
        andi    r2, 7, r0
        pta/u   Laligned, tr1
        mperm.w r3, r63, r3



Home | Main Index | Thread Index | Old Index