[PATCH] oleaut32: Capture NULL ref_lookup table (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jan 31 06:09:12 CST 2009
Hi,
CID 552, the ref_lookup could be NULL, return error in
this case.
Ciao, Marcus
---
dlls/oleaut32/typelib.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 503aaf7..1bbdeec 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3090,6 +3090,11 @@ typedef struct
static HRESULT sltg_get_typelib_ref(const sltg_ref_lookup_t *table, DWORD typeinfo_ref,
HREFTYPE *typelib_ref)
{
+ if (!table) {
+ ERR_(typelib)("Reference table not specified (NULL).\n");
+ *typelib_ref = -1;
+ return E_FAIL;
+ }
if(typeinfo_ref < table->num)
{
*typelib_ref = table->refs[typeinfo_ref];
--
1.5.6
More information about the wine-patches
mailing list