examples/client/client.c and examples/client/client.c: use XSTRLCPY() to assure proper null termination.

This commit is contained in:
Daniel Pouzzner
2024-12-19 16:13:07 -06:00
parent ca4b1667ee
commit ad8f74b650
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;