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:
Viktor Szakats 2025-12-23 11:59:59 +01:00
parent 66aec526fc
commit 436e67f65b
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
9 changed files with 43 additions and 30 deletions

View file

@ -94,7 +94,7 @@
#define _CRT_NONSTDC_NO_DEPRECATE /* for close(), fileno(), unlink(), etc. */
#endif
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS /* for getenv(), strcpy(), tests: sscanf() */
#define _CRT_SECURE_NO_WARNINGS /* for getenv(), tests: sscanf() */
#endif
#endif /* _MSC_VER */