summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlisher Alikhodjaev <alisher@google.com>2022-10-26 14:03:48 -0700
committerAlisher Alikhodjaev <alisher@google.com>2022-10-26 14:03:48 -0700
commitf5f24d0ea2bcc33f18915c4c7369f803c45e53b0 (patch)
treea068b81d7c82354b812de5f05c73660b388df73e
parent32d00bc133fc742c6d15417ee8aca19046f2186d (diff)
downloadNfc-f5f24d0ea2bcc33f18915c4c7369f803c45e53b0.tar.gz
DO NOT MERGE OOBW in Mfc_Transceive()
Bug: 241387741 Test: build ok Change-Id: Idf45b940ac21eeb4cf09c222988bfce22b0bef55
-rw-r--r--nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
index 6eac1385..28ede0e0 100644
--- a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
+++ b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.cpp
@@ -994,6 +994,11 @@ NFCSTATUS Mfc_Transceive(uint8_t* p_data, uint32_t len) {
return status;
}
+ if (len > (MAX_BUFF_SIZE * 2)) {
+ android_errorWriteLog(0x534e4554, "241387741");
+ return status;
+ }
+
gphNxpExtns_Context.RawWriteCallBack = false;
gphNxpExtns_Context.CallBackMifare = NULL;
gphNxpExtns_Context.CallBackCtxt = NdefMap;