1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

odbccp32: SQLConfigDataSource/W fix crash with passed NULL attribute parameter.

This commit is contained in:
Alistair Leslie-Hughes 2024-06-17 17:55:14 +10:00 committed by Alexandre Julliard
parent 6dca99a713
commit 4aab3e42c1

View File

@ -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)