wil6210: check null pointer in _wil_cfg80211_merge_extra_ies
authorAlexei Avshalom Lazar <ailizaro@codeaurora.org>
Fri, 22 Feb 2019 14:21:05 +0000 (16:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:33:00 +0000 (22:33 +0200)
commit6115055b4efeee072012e18c206242a7234bf456
treef8a55e076f8c11e25b9adb150cb1420cde532c68
parent9546c3662dc5f8c3f9875c96f589dda2f38049a9
wil6210: check null pointer in _wil_cfg80211_merge_extra_ies

[ Upstream commit de77a53c2d1e8fb3621e63e8e1f0f0c9a1a99ff7 ]

ies1 or ies2 might be null when code inside
_wil_cfg80211_merge_extra_ies access them.
Add explicit check for null and make sure ies1/ies2 are not
accessed in such a case.

spos might be null and be accessed inside
_wil_cfg80211_merge_extra_ies.
Add explicit check for null in the while condition statement
and make sure spos is not accessed in such a case.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/wil6210/cfg80211.c