From fe1840be4019209ea54141667665d4a1c2c298bd Mon Sep 17 00:00:00 2001 From: Tomasz Swierczek Date: Wed, 15 Jan 2020 13:37:25 +0100 Subject: Add fixes for gcc 9 Change-Id: Ic1c3742b41591f22ecbec30bf140acc1cc17082f --- srcs/SecCryptoSvc.c | 6 ++++-- 1 file 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); -- cgit v1.2.3