* [PATCH] iwlwifi: fix possible potential NULL pointer dereference
@ 2020-01-02 2:49 m1s5p6688
0 siblings, 0 replies; only message in thread
From: m1s5p6688 @ 2020-01-02 2:49 UTC (permalink / raw)
To: linux-wireless
Cc: johannes.berg, emmanuel.grumbach, luciano.coelho, linuxwifi
From: Qing Xu <m1s5p6688@gmail.com>
iwl_req_fw_callback() check the wrong kmemdup return value, leading
to a NULL pointer dereference.
Fix it by replacing the wrong value with the correct.
Signed-off-by: Qing Xu <m1s5p6688@gmail.com>
---
drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 4096ccf58..68c9b7157 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -1455,7 +1455,7 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
kmemdup(pieces->dbg_conf_tlv[i],
pieces->dbg_conf_tlv_len[i],
GFP_KERNEL);
- if (!pieces->dbg_conf_tlv_len[i])
+ if (!drv->fw.dbg.conf_tlv[i])
goto out_free_fw;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-02 2:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-02 2:49 [PATCH] iwlwifi: fix possible potential NULL pointer dereference m1s5p6688
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.