[PATCH] msi: check return value of ITypeLib_GetLibAttr (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Aug 31 05:46:16 CDT 2013
1072952 Unchecked return value
someone started checking the return value, so this check
now triggers for GetLibAttr calls.
---
dlls/msi/action.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index d964787..25acc07 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3646,7 +3646,15 @@ static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType,
return TRUE;
}
- ITypeLib_GetLibAttr(tl_struct->ptLib, &attr);
+ res = ITypeLib_GetLibAttr(tl_struct->ptLib, &attr);
+ if (FAILED(res))
+ {
+ msi_free(tl_struct->path);
+ tl_struct->path = NULL;
+
+ return TRUE;
+ }
+
if (IsEqualGUID(&(tl_struct->clsid),&(attr->guid)))
{
ITypeLib_ReleaseTLibAttr(tl_struct->ptLib, attr);
--
1.7.10.4
More information about the wine-patches
mailing list