Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/ia64/stand/common PR/50736: David Binderman: Check ...



details:   https://anonhg.NetBSD.org/src/rev/e54835606738
branches:  trunk
changeset: 813536:e54835606738
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 01 17:38:31 2016 +0000

description:
PR/50736: David Binderman: Check bounds before dereferencing.

diffstat:

 sys/arch/ia64/stand/common/dev_net.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 0324d8340464 -r e54835606738 sys/arch/ia64/stand/common/dev_net.c
--- a/sys/arch/ia64/stand/common/dev_net.c      Mon Feb 01 17:37:39 2016 +0000
+++ b/sys/arch/ia64/stand/common/dev_net.c      Mon Feb 01 17:38:31 2016 +0000
@@ -1,5 +1,5 @@
 /*     
- * $NetBSD: dev_net.c,v 1.9 2014/03/25 18:35:32 christos Exp $
+ * $NetBSD: dev_net.c,v 1.10 2016/02/01 17:38:31 christos Exp $
  */
 
 /*-
@@ -265,7 +265,7 @@
      * before passing it along.  This allows us to be compatible with
      * the kernel's diskless (BOOTP_NFSROOT) booting conventions
      */
-    for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
+    for (i = 0; i < FNAME_SIZE && rootpath[i] != '\0'; i++)
            if (rootpath[i] == ':')
                    break;
     if (i && i != FNAME_SIZE && rootpath[i] == ':') {



Home | Main Index | Thread Index | Old Index