Skip to content

Commit 5c62186

Browse files
committed
wolfcrypt/src/misc.c: fix -Wconversions in CopyString();
src/ssl.c: fix missing semicolon in wolfSSL_CTX_check_private_key().
1 parent 2d5e840 commit 5c62186

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6349,7 +6349,7 @@ int wolfSSL_CTX_check_private_key(const WOLFSSL_CTX* ctx)
63496349
res = check_cert_key(ctx->certificate, ctx->privateKey, ctx->altPrivateKey,
63506350
ctx->heap, ctx->privateKeyDevId, ctx->privateKeyLabel,
63516351
ctx->privateKeyId, ctx->altPrivateKeyDevId, ctx->altPrivateKeyLabel,
6352-
ctx->altPrivateKeyId) != 0
6352+
ctx->altPrivateKeyId) != 0;
63536353
#ifdef WOLFSSL_BLIND_PRIVATE_KEY
63546354
{
63556355
int ret;

wolfcrypt/src/misc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,9 +1011,9 @@ WC_MISC_STATIC WC_INLINE char* CopyString(const char* src, int srcLen,
10111011
if (srcLen <= 0)
10121012
srcLen = (int)XSTRLEN(src);
10131013

1014-
dst = (char*)XMALLOC(srcLen + 1, heap, type);
1014+
dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
10151015
if (dst != NULL) {
1016-
XMEMCPY(dst, src, srcLen);
1016+
XMEMCPY(dst, src, (size_t)srcLen);
10171017
dst[srcLen] = '\0';
10181018
}
10191019

0 commit comments

Comments
 (0)