diff options
author | Anil Hiranniah <anil.hiranniah@nxp.com> | 2020-03-25 03:37:44 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-03-25 03:37:44 +0000 |
commit | a7f3300cd88cc520d01dac6cc65f1fe9010c5e3a (patch) | |
tree | 971c2864d0fd8fed86a5ef9c1b5a034bfc177eda | |
parent | fe80b466735079b0dc3a0d64313c2a070f6d9ea3 (diff) | |
parent | cbd7fc76d19984e3a0ad168618c427956bab1201 (diff) | |
download | secure_element-a7f3300cd88cc520d01dac6cc65f1fe9010c5e3a.tar.gz |
Replace string functions with safe alternatives am: cb7dde1668 am: cbd7fc76d1
Change-Id: I4a35402b65dc770bcd89942f2f585aad576c2a95
-rw-r--r-- | libese-spi/p73/lib/phNxpEse_Api.cpp | 2 | ||||
-rwxr-xr-x | ls_client/src/LsLib.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libese-spi/p73/lib/phNxpEse_Api.cpp b/libese-spi/p73/lib/phNxpEse_Api.cpp index 6ffefcf..4d054b8 100644 --- a/libese-spi/p73/lib/phNxpEse_Api.cpp +++ b/libese-spi/p73/lib/phNxpEse_Api.cpp @@ -210,7 +210,7 @@ ESESTATUS phNxpEse_open(phNxpEse_initParams initParams) { /*Read device node path*/ ese_node = EseConfig::getString(NAME_NXP_ESE_DEV_NODE, "/dev/pn81a"); - strcpy(ese_dev_node, ese_node.c_str()); + strlcpy(ese_dev_node, ese_node.c_str(), sizeof(ese_dev_node)); tPalConfig.pDevName = (int8_t*)ese_dev_node; /* Initialize PAL layer */ diff --git a/ls_client/src/LsLib.cpp b/ls_client/src/LsLib.cpp index 87a7763..c670408 100755 --- a/ls_client/src/LsLib.cpp +++ b/ls_client/src/LsLib.cpp @@ -95,7 +95,7 @@ LSCSTATUS LSC_update_seq_handler( ALOGD_IF(ese_debug_enabled, "%s: enter", fn); memset(&update_info, 0, sizeof(Lsc_ImageInfo_t)); if (dest != NULL) { - strcat(update_info.fls_RespPath, dest); + strlcat(update_info.fls_RespPath, dest, sizeof(update_info.fls_RespPath)); ALOGD_IF(ese_debug_enabled, "%s: Loader Service response data path/destination: %s", fn, dest); update_info.bytes_wrote = 0xAA; @@ -106,7 +106,7 @@ LSCSTATUS LSC_update_seq_handler( return LSCSTATUS_FAILED; } // memcpy(update_info.fls_path, (char*)Lsc_path, sizeof(Lsc_path)); - strcat(update_info.fls_path, name); + strlcat(update_info.fls_path, name, sizeof(update_info.fls_path)); ALOGD_IF(ese_debug_enabled, "Selected applet to install is: %s", update_info.fls_path); |