mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
NFC: Fix possible NULL pointer dereference issue
Due to possible NULL pointer dereference kw issues are seen. Modify code and add proper NULL check to avoid NULL pointer dereference. Change-Id: Ie9f19fa9ac57a108575c08bdc123313eea3df49c Signed-off-by: Tapas Dey <tdey@codeaurora.org>
This commit is contained in:
parent
6a2beea9de
commit
6aa08d2a70
1 changed files with 5 additions and 1 deletions
|
|
@ -369,10 +369,14 @@ void read_cold_reset_rsp(struct nfc_dev *nfc_dev, char *header)
|
|||
__func__);
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
} else if (header) {
|
||||
|
||||
/* For I3C driver, header is read by the worker thread */
|
||||
memcpy(cold_reset_rsp, header, NCI_HDR_LEN);
|
||||
|
||||
} else {
|
||||
pr_err("%s: - invalid or NULL header\n", __func__);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((cold_reset_rsp[0] != COLD_RESET_RSP_GID)
|
||||
|
|
|
|||
Loading…
Reference in a new issue