From: Alex Henrie alexhenrie24@gmail.com
--- dlls/odbccp32/odbccp32.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index 90875121438..c912bc0f3cc 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -638,6 +638,7 @@ BOOL WINAPI SQLGetInstalledDriversW(WCHAR *buf, WORD size, WORD *sizeout)
valuelen = 256; value = malloc(valuelen * sizeof(WCHAR)); + if (!value) goto oom;
size--;
@@ -647,7 +648,9 @@ BOOL WINAPI SQLGetInstalledDriversW(WCHAR *buf, WORD size, WORD *sizeout) res = RegEnumValueW(drivers, index, value, &len, NULL, NULL, NULL, NULL); while (res == ERROR_MORE_DATA) { - value = realloc(value, ++len * sizeof(WCHAR)); + free(value); + value = malloc(++len * sizeof(WCHAR)); + if (!value) goto oom; res = RegEnumValueW(drivers, index, value, &len, NULL, NULL, NULL, NULL); } if (res == ERROR_SUCCESS) @@ -673,6 +676,10 @@ BOOL WINAPI SQLGetInstalledDriversW(WCHAR *buf, WORD size, WORD *sizeout) if (sizeout) *sizeout = written; return ret; + +oom: + push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem); + return FALSE; }
BOOL WINAPI SQLGetInstalledDrivers(char *buf, WORD size, WORD *sizeout)
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=137402
Your paranoid android.
=== debian11b (64 bit WoW report) ===
wininet: http: Timeout