Commit c2571f23 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

oledb32: Remove the trailing semicolon.

Also, this fixes an out-of-bounds write because the space for the terminating '\0' wasn't included previously.
parent 23b556c5
...@@ -903,7 +903,7 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I ...@@ -903,7 +903,7 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I
IDBProperties_Release(props); IDBProperties_Release(props);
/* check if we need to skip password */ /* check if we need to skip password */
len = lstrlenW(progid) + lstrlenW(providerW) + 1; /* including ';' */ len = lstrlenW(progid) + lstrlenW(providerW) + 1; /* including '\0' */
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
WCHAR *descr = get_propinfo_descr(&propset->rgProperties[i], propinfoset); WCHAR *descr = get_propinfo_descr(&propset->rgProperties[i], propinfoset);
...@@ -926,7 +926,6 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I ...@@ -926,7 +926,6 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I
/* provider name */ /* provider name */
lstrcatW(*init_string, providerW); lstrcatW(*init_string, providerW);
lstrcatW(*init_string, progid); lstrcatW(*init_string, progid);
lstrcatW(*init_string, L";");
CoTaskMemFree(progid); CoTaskMemFree(progid);
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
...@@ -938,10 +937,10 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I ...@@ -938,10 +937,10 @@ static HRESULT WINAPI datainit_GetInitializationString(IDataInitialize *iface, I
descr = get_propinfo_descr(&propset->rgProperties[i], propinfoset); descr = get_propinfo_descr(&propset->rgProperties[i], propinfoset);
if (descr) if (descr)
{ {
lstrcatW(*init_string, L";");
lstrcatW(*init_string, descr); lstrcatW(*init_string, descr);
lstrcatW(*init_string, L"="); lstrcatW(*init_string, L"=");
write_propvalue_str(*init_string, &propset->rgProperties[i]); write_propvalue_str(*init_string, &propset->rgProperties[i]);
lstrcatW(*init_string, L";");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment