diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-01-30 02:00:07 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-01-30 02:00:07 +0100 |
commit | 18b931dde7d9259968a91a1baee96db92a79d34d (patch) | |
tree | 3f27a6b5609ee711e0b8d423c5a95e71407a2353 /sys | |
parent | 0c7d5168c3dde9cf048cebc56d304466f8d85549 (diff) |
wifi: ignore truncated tlv in beacon/probes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/9/pc/wifi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/pc/wifi.c b/sys/src/9/pc/wifi.c index 62c0b9b76..19c5b3676 100644 --- a/sys/src/9/pc/wifi.c +++ b/sys/src/9/pc/wifi.c @@ -388,6 +388,8 @@ recvbeacon(Wifi *wifi, Wnode *wn, uchar *d, int len) for(e = d + len; d+2 <= e; d = x){ d += 2; x = d + d[-1]; + if(x > e) + break; /* truncated */ t = d[-2]; /* skip double entries */ |