All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: rtl8723bs: remove unreachable code in
@ 2026-06-01 15:01 Nikolay Kulikov
  2026-06-01 15:01 ` [PATCH 1/2] staging: rtl8723bs: remove unused case from update_beacon() Nikolay Kulikov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nikolay Kulikov @ 2026-06-01 15:01 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel, Nikolay Kulikov

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-02  5:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 15:01 [PATCH 0/2] staging: rtl8723bs: remove unreachable code in Nikolay Kulikov
2026-06-01 15:01 ` [PATCH 1/2] staging: rtl8723bs: remove unused case from update_beacon() Nikolay Kulikov
2026-06-01 15:01 ` [PATCH 2/2] staging: rtl8723bs: remove unused 'oui' parameter " Nikolay Kulikov
2026-06-02  5:35 ` [PATCH 0/2] staging: rtl8723bs: remove unreachable code in Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.