summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);