Skip to content

Commit

Permalink
wireless, wl1251: Fix potential NULL pointer dereference in wl1251_op…
Browse files Browse the repository at this point in the history
…_bss_info_changed()

In drivers/net/wireless/wl1251/main.c:wl1251_op_bss_info_changed() we make
a call to ieee80211_beacon_get() which may return NULL, but we do not
check the return value before dereferencing the pointer.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
jjuhl authored and linvjw committed Feb 3, 2011
1 parent 4334ec8 commit 4d048aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/wireless/wl1251/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,

if (changed & BSS_CHANGED_BEACON) {
beacon = ieee80211_beacon_get(hw, vif);
if (!beacon)
goto out_sleep;

ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data,
beacon->len);

Expand Down

0 comments on commit 4d048aa

Please sign in to comment.