Module: wine Branch: master Commit: 4aab3e42c1c2639f66b76bb43fea01f54e61a5c7 URL: https://gitlab.winehq.org/wine/wine/-/commit/4aab3e42c1c2639f66b76bb43fea01f...
Author: Alistair Leslie-Hughes leslie_alistair@hotmail.com Date: Mon Jun 17 17:55:14 2024 +1000
odbccp32: SQLConfigDataSource/W fix crash with passed NULL attribute parameter.
---
dlls/odbccp32/odbccp32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c index d8d57e6bd40..46468765b86 100644 --- a/dlls/odbccp32/odbccp32.c +++ b/dlls/odbccp32/odbccp32.c @@ -372,7 +372,7 @@ BOOL WINAPI SQLConfigDataSourceW(HWND hwnd, WORD request, LPCWSTR driver, LPCWST WORD mapped_request;
TRACE("%p, %d, %s, %s\n", hwnd, request, debugstr_w(driver), debugstr_w(attributes)); - if (TRACE_ON(odbc)) + if (TRACE_ON(odbc) && attributes) { const WCHAR *p; for (p = attributes; *p; p += lstrlenW(p) + 1) @@ -417,7 +417,7 @@ BOOL WINAPI SQLConfigDataSource(HWND hwnd, WORD request, LPCSTR driver, LPCSTR a
TRACE("%p, %d, %s, %s\n", hwnd, request, debugstr_a(driver), debugstr_a(attributes));
- if (TRACE_ON(odbc)) + if (TRACE_ON(odbc) && attributes) { const char *p; for (p = attributes; *p; p += lstrlenA(p) + 1)