1. 15 Feb, 2013 37 commits
  2. 14 Feb, 2013 2 commits
    • Peter Huewe's avatar
      staging/rtl8192u/ieee80211: Fix buffer overflow in ieee80211_softmac_wx.c · 67a88e63
      Peter Huewe authored
      Clang/scan-build complains about a possible buffer overflow in
      ieee80211_wx_get_name:
      
      .../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:499:3:
      warning: String copy function overflows destination buffer
      	strcat(wrqu->name," link..");
      
      .../staging/rtl8192u/ieee80211/ieee80211_softmac_wx.c:497:3:
      warning: String copy function overflows destination buffer
      	strcat(wrqu->name," linked");
      
      The buffer wrqu->name is only IFNAMSIZ bytes big (currently 16),
      so if we have a "802.11b/g/n linked" device we overrun the buffer by 3
      bytes.
      
      -> Use strlcopy / strlcat to populate the name.
      This is done in a similar fashion in
      staging/rtl8187se/ieee80211/ieee80211_softmac_wx.c
      
      While at it cleaned some whitespace issues.
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67a88e63
    • Peter Huewe's avatar
      staging/wlan-ng: Fix 'Branch condition evaluates to a garbage value' in p80211netdev.c · fae7e4d3
      Peter Huewe authored
      clang/scan-build complains that:
      p80211netdev.c:451:6: warning: Branch condition evaluates to a garbage
      value
              if ((p80211_wep.data) && (p80211_wep.data != skb->data))
      	            ^~~~~~~~~~~~~~~~~
      
      This can happen in p80211knetdev_hard_start_xmit if
      - if (wlandev->state != WLAN_DEVICE_OPEN) evaluates to true.
      the execution flow then continues at the 'failed' label where
      p80211_wep.data is used without being initialized first.
      
      -> Initialize the data field to NULL to fix this issue.
      Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fae7e4d3
  3. 13 Feb, 2013 1 commit