mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:43:31 +03:00
tests: replace strcpy() with curlx_strcopy()
Also: - examples/hsts-preload: apply the same change as it's based on lib1915 in tests. Make a local clone of `curlx_strcopy()`. Then drop the `_CRT_SECURE_NO_WARNINGS` hack, that's no longer necessary. - curl_setup.h: delete `strcpy()` from the `_CRT_SECURE_NO_WARNINGS` list. Closes #20076
This commit is contained in:
parent
66aec526fc
commit
436e67f65b
9 changed files with 43 additions and 30 deletions
|
|
@ -694,7 +694,7 @@ int bind_unix_socket(curl_socket_t sock, const char *unix_socket,
|
|||
logmsg("Too long unix socket domain path (%zd)", len);
|
||||
return -1;
|
||||
}
|
||||
strcpy(sau->sun_path, unix_socket);
|
||||
curlx_strcopy(sau->sun_path, sizeof(sau->sun_path), unix_socket, len);
|
||||
rc = bind(sock, (struct sockaddr *)sau, sizeof(struct sockaddr_un));
|
||||
if(rc && SOCKERRNO == SOCKEADDRINUSE) {
|
||||
struct_stat statbuf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue