Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88374
b: refs/heads/master
c: b358492
h: refs/heads/master
v: v3
  • Loading branch information
Masakazu Mokuno authored and John W. Linville committed Apr 15, 2008
1 parent 88c9786 commit 9c113a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc4ae1f46dbbcd08b3b5e23ad5ef87bf4bb41adf
refs/heads/master: b358492cd2a9c67bff352c5a60d86e7fc9627477
11 changes: 8 additions & 3 deletions trunk/drivers/net/ps3_gelic_wireless.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,18 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
data, len);
memset(ie_info, 0, sizeof(struct ie_info));

while (0 < data_left) {
while (2 <= data_left) {
item_id = *pos++;
item_len = *pos++;
data_left -= 2;

if (data_left < item_len)
break;

switch (item_id) {
case MFIE_TYPE_GENERIC:
if (!memcmp(pos, wpa_oui, OUI_LEN) &&
if ((OUI_LEN + 1 <= item_len) &&
!memcmp(pos, wpa_oui, OUI_LEN) &&
pos[OUI_LEN] == 0x01) {
ie_info->wpa.data = pos - 2;
ie_info->wpa.len = item_len + 2;
Expand All @@ -535,7 +540,7 @@ static void gelic_wl_parse_ie(u8 *data, size_t len,
break;
}
pos += item_len;
data_left -= item_len + 2;
data_left -= item_len;
}
pr_debug("%s: wpa=%p,%d wpa2=%p,%d\n", __func__,
ie_info->wpa.data, ie_info->wpa.len,
Expand Down

0 comments on commit 9c113a6

Please sign in to comment.