Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/stand/common Backout part of rev 1.4 which ca...



details:   https://anonhg.NetBSD.org/src/rev/c53976fe8a6b
branches:  trunk
changeset: 555298:c53976fe8a6b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Nov 13 15:53:31 2003 +0000

description:
Backout part of rev 1.4 which caused uninitialized pointer dereference.
(How does it works!?)

diffstat:

 sys/arch/hp300/stand/common/devopen.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 92e413d62d83 -r c53976fe8a6b sys/arch/hp300/stand/common/devopen.c
--- a/sys/arch/hp300/stand/common/devopen.c     Thu Nov 13 15:50:46 2003 +0000
+++ b/sys/arch/hp300/stand/common/devopen.c     Thu Nov 13 15:53:31 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: devopen.c,v 1.4 2002/08/04 00:44:58 gmcgarry Exp $     */
+/*     $NetBSD: devopen.c,v 1.5 2003/11/13 15:53:31 tsutsui Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -152,6 +152,10 @@
     int *argp, i;
     char *s, *args[4];
 
+    /* get device name */                    
+    for (s = (char *)fname; *s && *s != '/' && *s != ':' && *s != '('; s++)
+       ;
+
     /* first form */
     if (*s == '(') {
        /* lookup device and get index */



Home | Main Index | Thread Index | Old Index