summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/9/pc/wifi.c2
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 */