]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_doswin: simplify; remove unused options and strncpy calls 15047/head
authorDaniel Stenberg <daniel@haxx.se>
Thu, 26 Sep 2024 06:26:11 +0000 (08:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 26 Sep 2024 08:45:08 +0000 (10:45 +0200)
commitf383a1761723accc80b732e85fba17dbdcb35608
tree66d70932fcc78550465293749c96175d8530c2f5
parent0b70b23ef4d007031bc2ae4fc63d5ed9136bc2b5
tool_doswin: simplify; remove unused options and strncpy calls

SANITIZE_ALLOW_TRUNCATE and SANITIZE_ALLOW_COLONS were never used by
code, thus only making the code complicated for no good use.

Since nothing should truncate, using strncpy() is wrong.

Two cases of malloc + copy replaced with proper strdup() calls.

Fixup unit test 1604 accordingly.

Closes #15047
src/tool_doswin.c
src/tool_doswin.h
tests/unit/unit1604.c