diff options
-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; |