Updated patch for new cURL version.

This commit is contained in:
LoRd_MuldeR 2024-08-01 22:24:44 +02:00
parent e8f13cabba
commit cd652d4792
3 changed files with 30 additions and 21 deletions

View File

@ -1,8 +1,11 @@
diff --git "a/src/tool_doswin.c" "b/src/tool_doswin.c" src/tool_doswin.c | 57 ++++++++++++++++++++++++++++++++++++++++---------------
index db2b8b7..fb267ae 100644 1 file changed, 42 insertions(+), 15 deletions(-)
--- "a/src/tool_doswin.c"
+++ "b/src/tool_doswin.c" diff --git a/src/tool_doswin.c b/src/tool_doswin.c
@@ -614,6 +614,37 @@ char **__crt0_glob_function(char *arg) index 38ef0a0..8e976e9 100644
--- a/src/tool_doswin.c
+++ b/src/tool_doswin.c
@@ -615,6 +615,37 @@ char **__crt0_glob_function(char *arg)
* HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode * HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeProcessSearchMode
*/ */
@ -40,7 +43,7 @@ index db2b8b7..fb267ae 100644
CURLcode FindWin32CACert(struct OperationConfig *config, CURLcode FindWin32CACert(struct OperationConfig *config,
curl_sslbackend backend, curl_sslbackend backend,
const TCHAR *bundle_file) const TCHAR *bundle_file)
@@ -628,21 +659,9 @@ CURLcode FindWin32CACert(struct OperationConfig *config, @@ -634,21 +665,9 @@ CURLcode FindWin32CACert(struct OperationConfig *config,
*/ */
if(feature_ssl && backend != CURLSSLBACKEND_SCHANNEL) { if(feature_ssl && backend != CURLSSLBACKEND_SCHANNEL) {
@ -64,8 +67,8 @@ index db2b8b7..fb267ae 100644
+ config->cacert = cacert; + config->cacert = cacert;
} }
} }
#endif
@@ -776,6 +795,8 @@ bool tool_isVistaOrGreater; @@ -785,6 +804,8 @@ bool tool_isVistaOrGreater;
CURLcode win32_init(void) CURLcode win32_init(void)
{ {
@ -74,9 +77,9 @@ index db2b8b7..fb267ae 100644
/* curlx_verify_windows_version must be called during init at least once /* curlx_verify_windows_version must be called during init at least once
because it has its own initialization routine. */ because it has its own initialization routine. */
if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT, if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT,
@@ -788,6 +809,12 @@ CURLcode win32_init(void) @@ -799,6 +820,12 @@ CURLcode win32_init(void)
init_terminal(); init_terminal();
#endif
+ SecureZeroMemory(_acmdln, acmdln_len = strlen(_acmdln) * sizeof(char)); + SecureZeroMemory(_acmdln, acmdln_len = strlen(_acmdln) * sizeof(char));
+ SecureZeroMemory(_wcmdln, wcmdln_len = wcslen(_wcmdln) * sizeof(wchar_t)); + SecureZeroMemory(_wcmdln, wcmdln_len = wcslen(_wcmdln) * sizeof(wchar_t));

View File

@ -1,7 +1,10 @@
diff --git "a/src/tool_getparam.c" "b/src/tool_getparam.c" src/tool_getparam.c | 9 +++++++++
index 508e567..a745b22 100644 1 file changed, 9 insertions(+)
--- "a/src/tool_getparam.c"
+++ "b/src/tool_getparam.c" diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 4c9392c..d7310d4 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -23,6 +23,10 @@ @@ -23,6 +23,10 @@
***************************************************************************/ ***************************************************************************/
#include "tool_setup.h" #include "tool_setup.h"
@ -13,8 +16,8 @@ index 508e567..a745b22 100644
#include "strcase.h" #include "strcase.h"
#define ENABLE_CURLX_PRINTF #define ENABLE_CURLX_PRINTF
@@ -830,8 +834,13 @@ static void cleanarg(argv_item_t str) @@ -838,8 +842,13 @@ static void cleanarg(argv_item_t str)
* argument out so that the username:password isn't displayed in the * argument out so that the username:password is not displayed in the
* system process list */ * system process list */
if(str) { if(str) {
+#ifdef _UNICODE +#ifdef _UNICODE

View File

@ -1,7 +1,10 @@
diff --git "a/src/tool_parsecfg.c" "b/src/tool_parsecfg.c" src/tool_parsecfg.c | 42 ++++++++++++++++--------------------------
index da48700..60e7b44 100644 1 file changed, 16 insertions(+), 26 deletions(-)
--- "a/src/tool_parsecfg.c"
+++ "b/src/tool_parsecfg.c" diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index d0a3159..6034b17 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -47,29 +47,20 @@ static const char *unslashquote(const char *line, char *param); @@ -47,29 +47,20 @@ static const char *unslashquote(const char *line, char *param);
static bool my_get_line(FILE *fp, struct curlx_dynbuf *, bool *error); static bool my_get_line(FILE *fp, struct curlx_dynbuf *, bool *error);
@ -11,7 +14,7 @@ index da48700..60e7b44 100644
{ {
- static char filebuffer[512]; - static char filebuffer[512];
- /* Get the filename of our executable. GetModuleFileName is already declared - /* Get the filename of our executable. GetModuleFileName is already declared
- * via inclusions done in setup header file. We assume that we are using - * via inclusions done in setup header file. We assume that we are using
- * the ASCII version here. - * the ASCII version here.
- */ - */
- unsigned long len = GetModuleFileNameA(0, filebuffer, sizeof(filebuffer)); - unsigned long len = GetModuleFileNameA(0, filebuffer, sizeof(filebuffer));