mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
examples/client/client.c and examples/client/client.c: use XSTRLCPY() to assure proper null termination.
This commit is contained in:
@ -2391,7 +2391,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
err_sys("provided connection ID is too big");
|
||||
}
|
||||
else {
|
||||
strncpy(dtlsCID, myoptarg, DTLS_CID_BUFFER_SIZE-1);
|
||||
XSTRLCPY(dtlsCID, myoptarg, DTLS_CID_BUFFER_SIZE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2411,7 +2411,7 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
err_sys("provided connection ID is too big");
|
||||
}
|
||||
else {
|
||||
strncpy(dtlsCID, myoptarg, DTLS_CID_BUFFER_SIZE-1);
|
||||
XSTRLCPY(dtlsCID, myoptarg, DTLS_CID_BUFFER_SIZE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user