Skip to content

Commit c69d969

Browse files
Fix code review feedback and test failure.
1 parent 9fef016 commit c69d969

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/tls13.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8577,7 +8577,10 @@ static WC_INLINE int DecodeTls13SigAlg(byte* input, byte* hashAlgo,
85778577
break;
85788578
#endif
85798579
case NEW_SA_MAJOR:
8580-
*hashAlgo = (byte)GetNewSAHashAlgo(input[1]);
8580+
{
8581+
enum wc_MACAlgorithm mac = GetNewSAHashAlgo(input[1]);
8582+
*hashAlgo = (byte)mac;
8583+
}
85818584

85828585
/* PSS encryption: 0x080[4-6] */
85838586
if (input[1] >= RSA_PSS_RSAE_SHA256_MINOR &&

src/wolfio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ int LwIPNativeSend(WOLFSSL* ssl, char* buf, int sz, void* ctx)
32863286
err_t ret;
32873287
WOLFSSL_LWIP_NATIVE_STATE* nlwip = (WOLFSSL_LWIP_NATIVE_STATE*)ctx;
32883288

3289-
if (sz > UINT16_MAX || sz < 0) {
3289+
if (sz < 0 || sz > (int)WOLFSSL_MAX_16BIT) {
32903290
return BAD_FUNC_ARG;
32913291
}
32923292

0 commit comments

Comments
 (0)