From 31576d985adceb6581bb7ba30a815739b73928c4 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Tue, 25 Oct 2016 14:32:12 -0700 Subject: [PATCH] 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) --- core/wma/src/wma_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index a0f798fc7166..d5aef6cedc37 100644 --- a/core/wma/src/wma_mgmt.c +++ b/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; }