Commit 6493a78f authored by Aymen Qader's avatar Aymen Qader Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: Skip unnecessary field checks



Skip unnecessary request field checks when the information element
pointer is null.

Signed-off-by: default avatarAymen Qader <qader.aymen@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent daf9a56c
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1267,13 +1267,12 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
	/*  checking SSID */
	p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len,
		pkt_len - WLAN_HDR_A3_LEN - ie_offset);
	if (p == NULL) {
		status = _STATS_FAILURE_;
	}

	if (ie_len == 0) /*  broadcast ssid, however it is not allowed in assocreq */
	if (!p || ie_len == 0) {
		/*  broadcast ssid, however it is not allowed in assocreq */
		status = _STATS_FAILURE_;
	else {
		goto OnAssocReqFail;
	} else {
		/*  check if ssid match */
		if (memcmp((void *)(p+2), cur->Ssid.Ssid, cur->Ssid.SsidLength))
			status = _STATS_FAILURE_;