Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79409
b: refs/heads/master
c: 47f76ca
h: refs/heads/master
i:
  79407: 9b90bb6
v: v3
  • Loading branch information
Michael Buesch authored and David S. Miller committed Jan 28, 2008
1 parent 4e3938a commit fe5bd65
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 280d0e16bcbf5893505a0d0897f3ca1ddc0764fa
refs/heads/master: 47f76ca3a34cd6571a2de39da2926123ca39a4c1
7 changes: 4 additions & 3 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
u16 ram_offset,
u16 shm_size_offset, u8 rate)
{
int i, len;
unsigned int i, len, variable_len;
const struct ieee80211_mgmt *bcn;
const u8 *ie;
bool tim_found = 0;
Expand All @@ -1178,7 +1178,8 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
/* Find the position of the TIM and the DTIM_period value
* and write them to SHM. */
ie = bcn->u.beacon.variable;
for (i = 0; i < len - 2; ) {
variable_len = len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
for (i = 0; i < variable_len - 2; ) {
uint8_t ie_id, ie_len;

ie_id = ie[i];
Expand All @@ -1189,7 +1190,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
/* This is the TIM Information Element */

/* Check whether the ie_len is in the beacon data range. */
if (len < ie_len + 2 + i)
if (variable_len < ie_len + 2 + i)
break;
/* A valid TIM is at least 4 bytes long. */
if (ie_len < 4)
Expand Down

0 comments on commit fe5bd65

Please sign in to comment.