Module Name: src Committed By: pooka Date: Sun Jan 9 13:49:57 UTC 2011
Modified Files: src/sys/rump/librump/rumpkern: rumpcopy.c Log Message: accept '\0' as a valid string To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/rump/librump/rumpkern/rumpcopy.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpkern/rumpcopy.c diff -u src/sys/rump/librump/rumpkern/rumpcopy.c:1.13 src/sys/rump/librump/rumpkern/rumpcopy.c:1.14 --- src/sys/rump/librump/rumpkern/rumpcopy.c:1.13 Thu Nov 25 17:59:03 2010 +++ src/sys/rump/librump/rumpkern/rumpcopy.c Sun Jan 9 13:49:57 2011 @@ -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--;