Kaynağa Gözat

qcacld-3.0: Fix input validation in wma_mgmt_tx_bundle_completion_handler

In wma_mgmt_tx_bundle_completion_handler function fix validation code from
logical AND to OR, to fail validation if any of the two input variable are
invalid.

Change-Id: I835b4d4bfb966e313c9ab05fb9fd57b10925d506
CRs-Fixed: 1082162
(cherry picked from commit d1c9e067b250fe75257164e1db7e363db583d49b)
Arif Hussain 8 yıl önce
ebeveyn
işleme
31576d985a
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      core/wma/src/wma_mgmt.c

+ 1 - 1
core/wma/src/wma_mgmt.c

@@ -2564,7 +2564,7 @@ int wma_mgmt_tx_bundle_completion_handler(void *handle, uint8_t *buf,
 	int i;
 
 	param_buf = (WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID_param_tlvs *)buf;
-	if (!param_buf && !wma_handle) {
+	if (!param_buf || !wma_handle) {
 		WMA_LOGE("%s: Invalid mgmt Tx completion event", __func__);
 		return -EINVAL;
 	}