summaryrefslogtreecommitdiff
path: root/halimpl/hal/phNxpNciHal_ext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'halimpl/hal/phNxpNciHal_ext.cc')
-rw-r--r--halimpl/hal/phNxpNciHal_ext.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/halimpl/hal/phNxpNciHal_ext.cc b/halimpl/hal/phNxpNciHal_ext.cc
index d1cc13c..3515234 100644
--- a/halimpl/hal/phNxpNciHal_ext.cc
+++ b/halimpl/hal/phNxpNciHal_ext.cc
@@ -194,6 +194,10 @@ NFCSTATUS phNxpNciHal_process_ext_rsp(uint8_t* p_ntf, uint16_t* p_len) {
status = NFCSTATUS_SUCCESS;
if (bDisableLegacyMfcExtns && bEnableMfcExtns && p_ntf[0] == 0) {
+ if (*p_len < NCI_HEADER_SIZE) {
+ android_errorWriteLog(0x534e4554, "169258743");
+ return NFCSTATUS_FAILED;
+ }
uint16_t extlen;
extlen = *p_len - NCI_HEADER_SIZE;
NxpMfcReaderInstance.AnalyzeMfcResp(&p_ntf[3], &extlen);