Source-Changes-HG archive

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

[src/netbsd-3]: src/sbin/sysctl Pull up revision 1.99 (requested by atatat in...



details:   https://anonhg.NetBSD.org/src/rev/be3c05e4d055
branches:  netbsd-3
changeset: 574957:be3c05e4d055
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Mar 20 21:49:09 2005 +0000

description:
Pull up revision 1.99 (requested by atatat in ticket #36):
Fix possible segmentation fault when retrieving descriptions.  Thought
I committed this a while ago.  I guess the fact that no one filed a pr
meant no one else found it.  :)

diffstat:

 sbin/sysctl/sysctl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 0709f44c4410 -r be3c05e4d055 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c      Sun Mar 20 14:39:48 2005 +0000
+++ b/sbin/sysctl/sysctl.c      Sun Mar 20 21:49:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysctl.c,v 1.97.2.1 2005/03/19 13:21:25 tron Exp $ */
+/*     $NetBSD: sysctl.c,v 1.97.2.2 2005/03/20 21:49:09 tron Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = "@(#)sysctl.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: sysctl.c,v 1.97.2.1 2005/03/19 13:21:25 tron Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.97.2.2 2005/03/20 21:49:09 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -1502,7 +1502,7 @@
                for (p = d; p < plim; p = NEXT_DESCR(p))
                        if (node->sysctl_num == p->descr_num)
                                break;
-               if (p < plim && node[i].sysctl_ver == p->descr_ver) {
+               if (p < plim && node->sysctl_ver == p->descr_ver) {
                        /*
                         * match found, attempt to attach description
                         */



Home | Main Index | Thread Index | Old Index