qcacld-3.0: Add NULL pointer check before de-reference

If csr_is_security_match() call csr_validate_any_default(), it passed
NULL pointers of some input parameters, check these pointers before
de-reference it.

Change-Id: I2cbd9f680c8a90919599db3af5b522ccb760892d
CRs-Fixed: 2423713
This commit is contained in:
Will Huang 2019-04-01 14:27:10 +08:00 committed by nshrivas
parent 5ac8919cb3
commit 5a7391c0c1

View File

@ -5251,8 +5251,10 @@ static bool csr_validate_any_default(struct mac_context *mac_ctx,
return match;
}
*neg_auth_type = eCSR_AUTH_TYPE_OPEN_SYSTEM;
*mc_cipher = eCSR_ENCRYPT_TYPE_NONE;
if (neg_auth_type)
*neg_auth_type = eCSR_AUTH_TYPE_OPEN_SYSTEM;
if (mc_cipher)
*mc_cipher = eCSR_ENCRYPT_TYPE_NONE;
*uc_cipher = eCSR_ENCRYPT_TYPE_NONE;
return match;