This series removes an unreachable switch-case branch in the
update_beacon() function. This branch doesn't check the value of the
'oui' pointer, which could lead to a NULL dereference.
Found with cppcheck:
core/rtw_ap.c:1404:27: error: Null pointer dereference: oui [ctunullpointer]
if (!memcmp(RTW_WPA_OUI, oui, 4))
^
core/rtw_ap.c:235:19: note: Calling function update_beacon, 3rd argument is null
update_beacon(padapter, WLAN_EID_TIM, NULL, true);
^
core/rtw_ap.c:1472:3: note: Calling function update_bcn_vendor_spec_ie, 2nd argument is null
update_bcn_vendor_spec_ie(padapter, oui);
^
core/rtw_ap.c:1404:27: note: Dereferencing argument oui that is null
if (!memcmp(RTW_WPA_OUI, oui, 4))
^
Nikolay Kulikov (2):
staging: rtl8723bs: remove unused case from update_beacon()
staging: rtl8723bs: remove unused 'oui' parameter from update_beacon()
drivers/staging/rtl8723bs/core/rtw_ap.c | 116 +++------------------
drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_recv.c | 4 +-
drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 +-
drivers/staging/rtl8723bs/include/rtw_ap.h | 2 +-
5 files changed, 24 insertions(+), 108 deletions(-)
base-commit: 7cb1c5b32a2bfde961fff8d5204526b609bcb30a
--
2.54.0