summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-24 01:29:05 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-03-24 01:29:05 +0000
commiteec70313939d0f87c14a101fc7dfebb2c1e6814b (patch)
tree192b921637b52df1e27fcb3f0796c1a4960329f9
parent0c2b6589e292ce8d975319e89c79f3394a6b989a (diff)
parent3fa943236c8f1d1081869c257381f9fc04306f28 (diff)
downloadsecure_element-android14-d1-s4-release.tar.gz
Change-Id: Iab3a0b7881f1a2fcf1896f8d730de9ef76764d33
-rw-r--r--snxxx/aidl/VirtualISO.cpp4
-rw-r--r--[-rwxr-xr-x]snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp7
-rw-r--r--[-rwxr-xr-x]snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp12
3 files changed, 19 insertions, 4 deletions
diff --git a/snxxx/aidl/VirtualISO.cpp b/snxxx/aidl/VirtualISO.cpp
index f4d5c59..571e365 100644
--- a/snxxx/aidl/VirtualISO.cpp
+++ b/snxxx/aidl/VirtualISO.cpp
@@ -589,7 +589,9 @@ ESESTATUS VirtualISO::seHalInit() {
}
deInitStatus = phNxpEse_deInit();
}
- phNxpEse_close(deInitStatus);
+ if (phNxpEse_close(deInitStatus) != ESESTATUS_SUCCESS) {
+ LOG(INFO) << "VISO close is not successful";
+ }
mIsEseInitialized = false;
}
return status;
diff --git a/snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp b/snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp
index 8c7ae81..5a3d01d 100755..100644
--- a/snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp
+++ b/snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp
@@ -1560,7 +1560,12 @@ static ESESTATUS phNxpEseProto7816_ProcessResponse(void) {
}
phNxpEseProto7816_3_Var.timeoutCounter = PH_PROTO_7816_VALUE_ZERO;
NXP_LOG_ESE_D("%s calling phNxpEse_StoreDatainList", __FUNCTION__);
- status = phNxpEse_StoreDatainList(data_len, p_data);
+ ESESTATUS storeDataStatus = phNxpEse_StoreDatainList(data_len, p_data);
+ if (storeDataStatus != ESESTATUS_SUCCESS) {
+ NXP_LOG_ESE_D("%s :phNxpEse_StoreDatainList failed. status = %x",
+ __FUNCTION__, storeDataStatus);
+ status = storeDataStatus;
+ }
}
}
}
diff --git a/snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp b/snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp
index fbb85c1..5fc188e 100755..100644
--- a/snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp
+++ b/snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Copyright 2018-2022 NXP
+ * Copyright 2018-2023 NXP
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1232,7 +1232,15 @@ ESESTATUS phNxpEse_read(uint32_t* data_len, uint8_t** pp_data) {
*pp_data = nxpese_ctxt.p_read_buff;
status = ESESTATUS_FAILED;
} else {
- PH_PAL_ESE_PRINT_PACKET_RX(nxpese_ctxt.p_read_buff, (uint16_t)ret);
+ if (ret > MAX_DATA_LEN) {
+ NXP_LOG_ESE_E(
+ "%s PAL Read buffer length(%x) is greater than MAX_DATA_LEN(%x) ",
+ __FUNCTION__, ret, MAX_DATA_LEN);
+ PH_PAL_ESE_PRINT_PACKET_RX(nxpese_ctxt.p_read_buff,
+ (uint16_t)MAX_DATA_LEN);
+ } else {
+ PH_PAL_ESE_PRINT_PACKET_RX(nxpese_ctxt.p_read_buff, (uint16_t)ret);
+ }
*data_len = ret;
*pp_data = nxpese_ctxt.p_read_buff;
status = ESESTATUS_SUCCESS;