]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_operate: return error on strdup() failure
authorDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 14:12:56 +0000 (16:12 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 19 Oct 2025 21:47:00 +0000 (23:47 +0200)
commit4c636b2dc1fb94e554f8885e595888a20cca11fc
tree7b3494c28759a951d55e6f7bb3239abff93e0e6f
parent7f19fa98199f967bda2ddb1da1d889c6eafcc14b
tool_operate: return error on strdup() failure

In src/tool_operate.c inside the Windows safe-search branch (#ifdef
CURL_CA_SEARCH_SAFE), the code assigns config->cacert = strdup(cacert);
at line 2076 without checking whether strdup returned NULL.

This would allow the code to continue with the wrong value set, causing
possible confusion.

Pointed out by ZeroPath
Closes #19145
src/tool_operate.c