]> git.ipfire.org Git - thirdparty/curl.git/commit
curlx: curlx_strcopy() instead of strcpy()
authorDaniel Stenberg <daniel@haxx.se>
Sun, 21 Dec 2025 22:40:24 +0000 (23:40 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 22 Dec 2025 22:01:05 +0000 (23:01 +0100)
commita535be4ea0960cfaeeaf744128a3acb4b7e8b67a
tree4e45f863d8504636edd5e28a2c93139227c37b73
parentf099c2ca55652e1694188937808d77ebfe2f1df4
curlx: curlx_strcopy() instead of strcpy()

This function REQUIRES the size of the target buffer as well as the
length of the source string. Meant to make it harder to do a bad
strcpy().

Removes 23 calls to strcpy().

Closes #20067
30 files changed:
lib/Makefile.inc
lib/curl_gethostname.c
lib/curl_gssapi.c
lib/curl_trc.c
lib/curlx/curlx.h
lib/curlx/inet_ntop.c
lib/curlx/strcopy.c [new file with mode: 0644]
lib/curlx/strcopy.h [new file with mode: 0644]
lib/curlx/strerr.c
lib/curlx/winapi.c
lib/hostip.c
lib/hsts.c
lib/imap.c
lib/mime.c
lib/progress.c
lib/smb.c
lib/strdup.h
lib/strerror.c
lib/tftp.c
lib/urlapi.c
lib/vquic/curl_osslq.c
lib/vtls/openssl.c
lib/vtls/vtls.c
lib/vtls/wolfssl.c
lib/ws.c
src/Makefile.inc
src/tool_main.c
src/tool_progress.c
tests/libtest/Makefile.inc
tests/server/Makefile.inc