diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-03-25 03:03:24 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-03-25 03:03:24 +0100 |
commit | 4687e196cc6afa63754f8928154dc3bbf276dda5 (patch) | |
tree | 653bae5b0e8330976a68affeb322b6ed16cbbd86 /sys/src/9/zynq/devether.c | |
parent | 0bc9ad781fdc9e4cfcd5fed1560775e241a366fc (diff) |
zynq: fix out of bounds access in etherprobe()
calling etherprobe() with -1 cardno will rereference
and call cards[-1].reset() which is wrong. don't do that!
Diffstat (limited to 'sys/src/9/zynq/devether.c')
-rw-r--r-- | sys/src/9/zynq/devether.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/src/9/zynq/devether.c b/sys/src/9/zynq/devether.c index c6ed2eac3..90777e6f5 100644 --- a/sys/src/9/zynq/devether.c +++ b/sys/src/9/zynq/devether.c @@ -435,12 +435,6 @@ etherreset(void) Ether *ether; int cardno, ctlrno; - for(ctlrno = 0; ctlrno < MaxEther; ctlrno++){ - if((ether = etherprobe(-1, ctlrno)) == nil) - continue; - etherxx[ctlrno] = ether; - } - cardno = ctlrno = 0; while(cards[cardno].type != nil && ctlrno < MaxEther){ if(etherxx[ctlrno] != nil){ |