[PATCH] oledb32: check start for NULL before strstrW (Coverity)
Marcus Meissner
meissner at suse.de
Mon Jan 7 15:17:22 CST 2013
CID 966607
This should have actually crashed always during testing?
Ciao, Marcus
---
dlls/oledb32/datainit.c | 2 +-
1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c
index a870bbc..c95d62e 100644
--- a/dlls/oledb32/datainit.c
+++ b/dlls/oledb32/datainit.c
@@ -426,7 +426,7 @@ static HRESULT WINAPI datainit_GetDataSource(IDataInitialize *iface, IUnknown *o
}
start = initstring;
- while ((eq = strstrW(start, eqW)))
+ while (start && (eq = strstrW(start, eqW)))
{
static const WCHAR providerW[] = {'P','r','o','v','i','d','e','r',0};
WCHAR *scol = strstrW(eq+1, scolW);
--
1.7.10.4
More information about the wine-patches
mailing list