@@ -7817,7 +7817,7 @@ void FreeKey(WOLFSSL* ssl, int type, void** pKey)
78177817int AllocKey(WOLFSSL* ssl, int type, void** pKey)
78187818{
78197819 int ret = WC_NO_ERR_TRACE(BAD_FUNC_ARG);
7820- int sz = 0;
7820+ size_t sz = 0;
78217821#ifdef HAVE_ECC
78227822 ecc_key* eccKey;
78237823#endif /* HAVE_ECC */
@@ -7894,7 +7894,7 @@ int AllocKey(WOLFSSL* ssl, int type, void** pKey)
78947894 }
78957895
78967896 /* Allocate memory for key */
7897- *pKey = (void *)XMALLOC((size_t) sz, ssl->heap, type);
7897+ *pKey = (void *)XMALLOC(sz, ssl->heap, type);
78987898 if (*pKey == NULL) {
78997899 return MEMORY_E;
79007900 }
@@ -20715,7 +20715,7 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
2071520715 #endif
2071620716
2071720717 if (IsEncryptionOn(ssl, 0)) {
20718- int ivExtra = 0;
20718+ word32 ivExtra = 0;
2071920719#ifndef WOLFSSL_AEAD_ONLY
2072020720 if (ssl->specs.cipher_type == block) {
2072120721 if (ssl->options.tls1_1)
@@ -20727,7 +20727,7 @@ static int DoAlert(WOLFSSL* ssl, byte* input, word32* inOutIdx, int* type)
2072720727 if (CipherHasExpIV(ssl))
2072820728 ivExtra = AESGCM_EXP_IV_SZ;
2072920729 }
20730- dataSz -= (word32) ivExtra;
20730+ dataSz -= ivExtra;
2073120731 dataSz -= ssl->keys.padSz;
2073220732 #if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
2073320733 if (ssl->options.startedETMRead)
0 commit comments