Skip to content

Commit

Permalink
examples/client/client.c and examples/client/client.c: use XSTRLCPY()…
Browse files Browse the repository at this point in the history
… to assure proper null termination.
  • Loading branch information
douzzer committed Dec 19, 2024
1 parent ca4b166 commit ad8f74b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ad8f74b

Please sign in to comment.