Installer can provide a Full path to the Driver, instead of provide the install path.
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/odbccp32/odbccp32.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index 90875121438..62e35e85f75 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -997,16 +997,28 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons if(lstrcmpiW(driverW, entry) == 0 || lstrcmpiW(setupW, entry) == 0 || lstrcmpiW(translator, entry) == 0) { - len = lstrlenW(path) + lstrlenW(slash) + lstrlenW(divider) + 1; - value = malloc(len * sizeof(WCHAR)); - if(!value) + if(GetFileAttributesW(divider) == INVALID_FILE_ATTRIBUTES) { - ERR("Out of memory\n"); - return; + len = lstrlenW(path) + lstrlenW(slash) + lstrlenW(divider) + 1; + value = malloc(len * sizeof(WCHAR)); + if(!value) + { + ERR("Out of memory\n"); + return; + } + + lstrcpyW(value, path); + lstrcatW(value, slash); + } + else + { + value = calloc(1, (lstrlenW(divider)+1) * sizeof(WCHAR)); + if(!value) + { + ERR("Out of memory\n"); + return; + } } - - lstrcpyW(value, path); - lstrcatW(value, slash); lstrcatW(value, divider); } else
From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
--- dlls/odbccp32/odbccp32.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index 62e35e85f75..95bfb90781e 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -1003,6 +1003,7 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons value = malloc(len * sizeof(WCHAR)); if(!value) { + RegCloseKey(hkeydriver); ERR("Out of memory\n"); return; } @@ -1015,6 +1016,7 @@ static void write_registry_values(const WCHAR *regkey, const WCHAR *driver, cons value = calloc(1, (lstrlenW(divider)+1) * sizeof(WCHAR)); if(!value) { + RegCloseKey(hkeydriver); ERR("Out of memory\n"); return; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146136
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000000E500E6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032