Skip to content

Commit 2b1c61a

Browse files
Merge pull request #6949 from bigbrett/zd16925
fix WOLFSSL_CALLBACK memory error
2 parents 3332b03 + ba37dc9 commit 2b1c61a

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

examples/server/server.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3392,7 +3392,14 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
33923392
} while (err == WC_PENDING_E);
33933393
}
33943394
#else
3395-
(void)nonBlocking;
3395+
if (nonBlocking) {
3396+
#ifdef WOLFSSL_DTLS
3397+
if (doDTLS) {
3398+
wolfSSL_dtls_set_using_nonblock(ssl, 1);
3399+
}
3400+
#endif
3401+
tcp_set_nonblocking(&clientfd);
3402+
}
33963403
ret = NonBlockingSSL_Accept(ssl);
33973404
#endif
33983405
#ifdef WOLFSSL_EARLY_DATA

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26872,7 +26872,7 @@ int PickHashSigAlgo(WOLFSSL* ssl, const byte* hashSigAlgo, word32 hashSigAlgoSz)
2687226872
/* add data, put in buffer if bigger than static buffer */
2687326873
info->packets[info->numberPackets].valueSz = totalSz;
2687426874
if (totalSz < MAX_VALUE_SZ) {
26875-
XMEMCPY(info->packets[info->numberPackets].value, data + lateRL,
26875+
XMEMCPY(info->packets[info->numberPackets].value + lateRL, data,
2687626876
sz);
2687726877
}
2687826878
else {

0 commit comments

Comments
 (0)