]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: cfg80211: tests: Fix potential NULL dereference in test_cfg80211_parse_colocate...
authorZichen Xie <zichenxie0106@gmail.com>
Fri, 15 Nov 2024 06:38:36 +0000 (00:38 -0600)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 4 Dec 2024 15:11:11 +0000 (16:11 +0100)
commit13c4f7714c6a1ecf748a2f22099447c14fe6ed8c
treeb9dbf0fca4c028348b2d409f24fe773a0f7398d3
parent8e66f6c6738e5b458345cd5f75ef6da035d95599
wifi: cfg80211: tests: Fix potential NULL dereference in test_cfg80211_parse_colocated_ap()

kunit_kzalloc() may return NULL, dereferencing it without NULL check may
lead to NULL dereference.
Add a NULL check for ies.

Fixes: 45d43937a44c ("wifi: cfg80211: add a kunit test for 6 GHz colocated AP parsing")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Link: https://patch.msgid.link/20241115063835.5888-1-zichenxie0106@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/tests/scan.c