[PATCH] msi: check return values of time conversions (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat May 25 04:04:09 CDT 2013
CID 1025788
checked elsewhere, so also check here. Unlikly to fail though.
Ciao, Marcus
---
dlls/msi/automation.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c
index 228d887..6266678 100644
--- a/dlls/msi/automation.c
+++ b/dlls/msi/automation.c
@@ -857,9 +857,12 @@ static HRESULT summaryinfo_invoke(
break;
case VT_DATE:
- VariantTimeToSystemTime(V_DATE(&varg1), &st);
- SystemTimeToFileTime(&st, &ftlocal);
- LocalFileTimeToFileTime(&ftlocal, &ft);
+ if (!VariantTimeToSystemTime(V_DATE(&varg1), &st))
+ return DISP_E_EXCEPTION;
+ if (!SystemTimeToFileTime(&st, &ftlocal))
+ return DISP_E_EXCEPTION;
+ if (!LocalFileTimeToFileTime(&ftlocal, &ft))
+ return DISP_E_EXCEPTION;
ret = MsiSummaryInfoSetPropertyW(This->msiHandle, V_I4(&varg0), VT_FILETIME, 0, &ft, NULL);
break;
--
1.7.10.4
More information about the wine-patches
mailing list