From: Cheoleun Moon Date: Mon, 27 Jul 2020 04:51:55 +0000 (+0900) Subject: Replace strcpy with strncpy X-Git-Tag: submit/tizen/20200728.015117^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb917e627f7bd460ff6e501a958e6c7ef21ad89c;p=platform%2Fcore%2Fapi%2Fnsd.git Replace strcpy with strncpy Change-Id: I8cf4f94a9115d058d2eb6cf2ccb198ca498e870e --- diff --git a/tests/tct-nsd-core.cpp b/tests/tct-nsd-core.cpp index fec5ee4..628de83 100755 --- a/tests/tct-nsd-core.cpp +++ b/tests/tct-nsd-core.cpp @@ -38,9 +38,9 @@ extern "C" { TEST(nsd, nsd){ char *pszGetTCName = NULL; - pszGetTCName = (char*)malloc( 256 ); - memset( pszGetTCName, 0x00, 256); - strcpy( pszGetTCName, "utc_nsd"); + pszGetTCName = (char*)malloc(256); + memset(pszGetTCName, 0x00, 256); + strncpy(pszGetTCName, "utc_nsd", 255); int i=0, result=0; dlog_print(DLOG_INFO, "NativeTCT", "[%s:%d] Executing TC Name = %s", __FUNCTION__, __LINE__, pszGetTCName);