MFC r210520:
Test index value is within the range before using it to reference array member. PR: bin/141838 Submitted by: Henning Petersen <henning.petersen@t-online.de>
This commit is contained in:
parent
258a09a63f
commit
7dac57c0ec
@ -118,7 +118,7 @@ defrouter_probe(struct ifinfo *ifinfo)
|
||||
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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user