diff options
-rw-r--r-- | drivers/net/wireless/hostap/hostap_plx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c index 6dfa041be66d..bc81b13a5a2a 100644 --- a/drivers/net/wireless/hostap/hostap_plx.c +++ b/drivers/net/wireless/hostap/hostap_plx.c | |||
@@ -364,7 +364,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
364 | 364 | ||
365 | pos = 0; | 365 | pos = 0; |
366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { | 366 | while (pos < CIS_MAX_LEN - 1 && cis[pos] != CISTPL_END) { |
367 | if (pos + cis[pos + 1] >= CIS_MAX_LEN) | 367 | if (pos + 2 + cis[pos + 1] > CIS_MAX_LEN) |
368 | goto cis_error; | 368 | goto cis_error; |
369 | 369 | ||
370 | switch (cis[pos]) { | 370 | switch (cis[pos]) { |
@@ -391,7 +391,7 @@ static int prism2_plx_check_cis(void __iomem *attr_mem, int attr_len, | |||
391 | break; | 391 | break; |
392 | 392 | ||
393 | case CISTPL_MANFID: | 393 | case CISTPL_MANFID: |
394 | if (cis[pos + 1] < 5) | 394 | if (cis[pos + 1] < 4) |
395 | goto cis_error; | 395 | goto cis_error; |
396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); | 396 | manfid1 = cis[pos + 2] + (cis[pos + 3] << 8); |
397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); | 397 | manfid2 = cis[pos + 4] + (cis[pos + 5] << 8); |