Commit 8105a120 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

oledb32: Check start for NULL before strstrW (Coverity).

parent 29957438
......@@ -414,8 +414,6 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
/* now set properties */
if (initstring)
{
static const WCHAR scolW[] = {';',0};
static const WCHAR eqW[] = {'=',0};
WCHAR *eq, *start;
hr = IUnknown_QueryInterface(*datasource, &IID_IDBProperties, (void**)&dbprops);
......@@ -426,10 +424,10 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
}
start = initstring;
while ((eq = strstrW(start, eqW)))
while (start && (eq = strchrW(start, '=')))
{
static const WCHAR providerW[] = {'P','r','o','v','i','d','e','r',0};
WCHAR *scol = strstrW(eq+1, scolW);
WCHAR *scol = strchrW(eq+1, ';');
BSTR value, name;
name = SysAllocStringLen(start, eq - start);
......
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