diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-24 01:29:05 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-24 01:29:05 +0000 |
commit | eec70313939d0f87c14a101fc7dfebb2c1e6814b (patch) | |
tree | 192b921637b52df1e27fcb3f0796c1a4960329f9 | |
parent | 0c2b6589e292ce8d975319e89c79f3394a6b989a (diff) | |
parent | 3fa943236c8f1d1081869c257381f9fc04306f28 (diff) | |
download | secure_element-android14-d1-s4-release.tar.gz |
Snap for 9806563 from 3fa943236c8f1d1081869c257381f9fc04306f28 to udc-d1-releaseandroid-14.0.0_r9android-14.0.0_r8android-14.0.0_r7android-14.0.0_r6android-14.0.0_r5android-14.0.0_r4android-14.0.0_r3android-14.0.0_r12android-14.0.0_r11android-14.0.0_r10android14-d1-s7-releaseandroid14-d1-s6-releaseandroid14-d1-s5-releaseandroid14-d1-s4-releaseandroid14-d1-s3-releaseandroid14-d1-s2-releaseandroid14-d1-s1-releaseandroid14-d1-release
Change-Id: Iab3a0b7881f1a2fcf1896f8d730de9ef76764d33
-rw-r--r-- | snxxx/aidl/VirtualISO.cpp | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | snxxx/libese-spi/p73/lib/phNxpEseProto7816_3.cpp | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | snxxx/libese-spi/p73/lib/phNxpEse_Api.cpp | 12 |
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; |