summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Swierczek <t.swierczek@samsung.com>2020-01-15 13:37:25 +0100
committerTomasz Swierczek <t.swierczek@samsung.com>2020-01-15 13:42:09 +0100
commitfe1840be4019209ea54141667665d4a1c2c298bd (patch)
tree466d3a2fc7d21a0959238ee66620c7147717361c
parent8a7dcc7768954564993e6828e305603e1ce2943f (diff)
downloadlibcryptsvc-tizen_6.0.tar.gz
libcryptsvc-tizen_6.0.tar.bz2
libcryptsvc-tizen_6.0.zip
Change-Id: Ic1c3742b41591f22ecbec30bf140acc1cc17082f
-rw-r--r--srcs/SecCryptoSvc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/srcs/SecCryptoSvc.c b/srcs/SecCryptoSvc.c
index c839efe..95861de 100644
--- a/srcs/SecCryptoSvc.c
+++ b/srcs/SecCryptoSvc.c
@@ -246,8 +246,10 @@ char *GetDuid(int idSize)
goto exit;
}
- strncpy(pKeyVersion, version, strlen(version));
- strncat(pKeyVersion, pId, strlen(pId));
+ unsigned int verLen = strlen(version);
+
+ memcpy(pKeyVersion, version, verLen + 1);
+ memcpy(pKeyVersion + verLen, pId, strlen(pId) + 1);
exit:
free(pKey);
free(pDuid);