Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern accept '\0' as a valid string



details:   https://anonhg.NetBSD.org/src/rev/b1c1ef6c00ff
branches:  trunk
changeset: 760616:b1c1ef6c00ff
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Jan 09 13:49:57 2011 +0000

description:
accept '\0' as a valid string

diffstat:

 sys/rump/librump/rumpkern/rumpcopy.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 521afc636e01 -r b1c1ef6c00ff sys/rump/librump/rumpkern/rumpcopy.c
--- a/sys/rump/librump/rumpkern/rumpcopy.c      Sun Jan 09 13:01:03 2011 +0000
+++ b/sys/rump/librump/rumpkern/rumpcopy.c      Sun Jan 09 13:49:57 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpcopy.c,v 1.13 2010/11/25 17:59:03 pooka Exp $      */
+/*     $NetBSD: rumpcopy.c,v 1.14 2011/01/09 13:49:57 pooka Exp $      */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.13 2010/11/25 17:59:03 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.14 2011/01/09 13:49:57 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/lwp.h>
@@ -124,7 +124,7 @@
 
        /* figure out if we got a terminated string or not */
        to = (uint8_t *)kaddr + (len-1);
-       while (to != kaddr) {
+       while (to >= (uint8_t *)kaddr) {
                if (*to == 0)
                        goto found;
                to--;



Home | Main Index | Thread Index | Old Index