NetBSD-Bugs archive

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

bin/42490: Limits in usr.sbin/rtsold/probe.c false



>Number:         42490
>Category:       bin
>Synopsis:       Limits in usr.sbin/rtsold/probe.c false
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 21 12:45:00 +0000 2009
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Limits in usr.sbin/rtsold/probe.c false.
>How-To-Repeat:

>Fix:
diff -u -r1.10 probe.c
--- usr.sbin/rtsold/probe.c     11 May 2006 08:37:24 -0000      1.10
+++ usr.sbin/rtsold/probe.c     21 Dec 2009 11:15:10 -0000
@@ -116,7 +116,7 @@
                goto closeandend;
        }
 
-       for (i = 0; dr.defrouter[i].if_index && i < PRLSTSIZ; i++) {
+       for (i = 0; i < DRLSTSIZ && dr.defrouter[i].if_index; i++) {
                if (ifindex && dr.defrouter[i].if_index == ifindex) {
                        /* sanity check */
                        if (!IN6_IS_ADDR_LINKLOCAL(&dr.defrouter[i].rtaddr)) {



Home | Main Index | Thread Index | Old Index