mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-15 02:44:23 -05:00
32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Alisher Alikhodjaev <alisher@google.com>
|
||
|
Date: Tue, 22 Nov 2022 15:49:11 -0800
|
||
|
Subject: [PATCH] DO NOT MERGE OOBW in phNciNfc_MfCreateXchgDataHdr
|
||
|
|
||
|
Bug: 246932269
|
||
|
Test: Build ok
|
||
|
Change-Id: I4dcd18da8b5145e218d070414da8997aff181364
|
||
|
(cherry picked from commit 2e4dfa6c92de30907851914add6485f8b7920968)
|
||
|
Merged-In: I4dcd18da8b5145e218d070414da8997aff181364
|
||
|
---
|
||
|
nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.c | 6 ++++++
|
||
|
1 file changed, 6 insertions(+)
|
||
|
|
||
|
diff --git a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.c b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.c
|
||
|
index cf5aafb6..3c01b2ab 100755
|
||
|
--- a/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.c
|
||
|
+++ b/nci/jni/extns/pn54x/src/mifare/phNxpExtns_MifareStd.c
|
||
|
@@ -1549,6 +1549,12 @@ phNciNfc_MfCreateXchgDataHdr(phNciNfc_TransceiveInfo_t tTranscvInfo,
|
||
|
NFCSTATUS status = NFCSTATUS_SUCCESS;
|
||
|
uint8_t i = 0;
|
||
|
|
||
|
+ if (tTranscvInfo.tSendData.wLen > (MAX_BUFF_SIZE - 1))
|
||
|
+ {
|
||
|
+ android_errorWriteLog(0x534e4554, "246932269");
|
||
|
+ return NFCSTATUS_FAILED;
|
||
|
+ }
|
||
|
+
|
||
|
buff[i++] = phNciNfc_e_MfRawDataXchgHdr;
|
||
|
memcpy(&buff[i],tTranscvInfo.tSendData.pBuff,tTranscvInfo.tSendData.wLen);
|
||
|
*buffSz = i + tTranscvInfo.tSendData.wLen;
|