linux/drivers/staging/rtl8192u
Peter Huewe 67a88e6390 staging/rtl8192u/ieee80211: Fix buffer overflow in ieee80211_softmac_wx.c
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: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 09:26:23 -08:00
..
ieee80211 staging/rtl8192u/ieee80211: Fix buffer overflow in ieee80211_softmac_wx.c 2013-02-14 09:26:23 -08:00
Kconfig
Makefile
authors
changes staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
copying
dot11d.h
ieee80211_crypt.h
r819xU_HTGen.h staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r819xU_HTType.h staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r819xU_cmdpkt.c staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r819xU_cmdpkt.h staging/rtl8192u: put { on same line as struct 2013-01-07 12:53:40 -08:00
r819xU_firmware.c staging/rtl8192u: use same indent for switch and case 2013-01-07 12:53:41 -08:00
r819xU_firmware.h staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r819xU_firmware_img.c
r819xU_firmware_img.h
r819xU_phy.c staging/rtl8192u: use same indent for switch and case 2013-01-07 12:53:41 -08:00
r819xU_phy.h
r819xU_phyreg.h staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r8180_93cx6.c staging/rtl8192u: indent with tabs, not spaces 2013-01-07 12:53:40 -08:00
r8180_93cx6.h staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00
r8180_pm.c
r8180_pm.h staging/rtl8192u: indent with tabs, not spaces 2013-01-07 12:53:40 -08:00
r8190_rtl8256.c staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r8190_rtl8256.h
r8192U.h staging/rtl8192u: indent with tabs, not spaces 2013-01-07 12:53:40 -08:00
r8192U_core.c staging: rtl8192u: fixed coding style issues in r8192U_core.c 2013-01-11 16:37:11 -08:00
r8192U_dm.c staging/rtl8192u: do not init statics to 0 2013-01-07 12:53:41 -08:00
r8192U_dm.h staging/rtl8192u: put { on same line as struct 2013-01-07 12:53:40 -08:00
r8192U_hw.h staging/rtl8192u: cleanfile run 2013-01-07 12:52:58 -08:00
r8192U_wx.c staging/rtl8192u: use same indent for switch and case 2013-01-07 12:53:41 -08:00
r8192U_wx.h staging: rtl8192u Fix a typo. 2012-05-01 21:50:09 -07:00