commit | 9d803cdb037118044011e200e065999199e4aafc | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Tue Dec 06 18:23:29 2016 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Dec 06 18:23:29 2016 +0000 |
tree | 038ab28cca81313acf8764bf629ba1ad7e687dcb | |
parent | c99d11b183159f3f72f3c1a1b241ce3983a292dd [diff] | |
parent | cba7232db14f6ffceb6813315177ee99c422e343 [diff] |
Merge "Fix native crash in nfc_ncif_proc_activate"
diff --git a/src/nfc/nfc/nfc_ncif.c b/src/nfc/nfc/nfc_ncif.c index 06c12bb..2329933 100644 --- a/src/nfc/nfc/nfc_ncif.c +++ b/src/nfc/nfc/nfc_ncif.c
@@ -839,6 +839,8 @@ pp++; /* TC */ } p_pa_iso->his_byte_len = (UINT8) (p_pa_iso->ats_res_len - (pp - p_pa_iso->ats_res)); + if (p_pa_iso->his_byte_len > NFC_MAX_HIS_BYTES_LEN) + p_pa_iso->his_byte_len = NFC_MAX_HIS_BYTES_LEN; memcpy (p_pa_iso->his_byte, pp, p_pa_iso->his_byte_len); break;