2024-11-12 17:31:27 +01:00
|
|
|
src/tool_doswin.c | 8 ++++++++
|
|
|
|
1 file changed, 8 insertions(+)
|
2024-08-01 22:24:44 +02:00
|
|
|
|
|
|
|
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
|
2024-11-12 17:31:27 +01:00
|
|
|
index 70b263113..28489a521 100644
|
2024-08-01 22:24:44 +02:00
|
|
|
--- a/src/tool_doswin.c
|
|
|
|
+++ b/src/tool_doswin.c
|
2024-11-12 17:31:27 +01:00
|
|
|
@@ -739,6 +739,8 @@ bool tool_isVistaOrGreater;
|
2023-12-07 03:46:35 +01:00
|
|
|
|
|
|
|
CURLcode win32_init(void)
|
|
|
|
{
|
|
|
|
+ size_t acmdln_len, wcmdln_len;
|
|
|
|
+
|
|
|
|
/* curlx_verify_windows_version must be called during init at least once
|
|
|
|
because it has its own initialization routine. */
|
|
|
|
if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT,
|
2024-11-12 17:31:27 +01:00
|
|
|
@@ -753,6 +755,12 @@ CURLcode win32_init(void)
|
2023-12-07 03:46:35 +01:00
|
|
|
init_terminal();
|
2024-08-01 22:24:44 +02:00
|
|
|
#endif
|
2023-12-07 03:46:35 +01:00
|
|
|
|
|
|
|
+ SecureZeroMemory(_acmdln, acmdln_len = strlen(_acmdln) * sizeof(char));
|
|
|
|
+ SecureZeroMemory(_wcmdln, wcmdln_len = wcslen(_wcmdln) * sizeof(wchar_t));
|
|
|
|
+
|
|
|
|
+ if (acmdln_len >= 4) strcpy(_acmdln, "curl");
|
|
|
|
+ if (wcmdln_len >= 4) wcscpy(_wcmdln, L"curl");
|
|
|
|
+
|
|
|
|
return CURLE_OK;
|
|
|
|
}
|
|
|
|
|