oleview: Respect size of array ITypeInfo_GetNames returns.

Misha Koshelev mk144210 at bcm.tmc.edu
Tue Feb 20 19:13:12 CST 2007


Right now if you have native MSI installed and use oleview to browse the
TypeInfo for Microsoft Installer it crashes. This is because for MSI for
several functions GetNames actually returns a smaller number of
parameters than specified in the cParams element of FUNCDESC + 1.
Honestly, I'm not really sure why this is the case, but in either case
I'm pretty sure a page fault should not be the response of oleview to
this, so this patch makes oleview respect the size that
ITypeInfo_GetNames says it returned.

Changelog:

	* oleview: Respect size of array ITypeInfo_GetNames returns.
-------------- next part --------------
From 681b233186d30d23fbc50e36a69a9ab466a6c09a Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Tue, 20 Feb 2007 19:10:14 -0600
Subject: oleview: Respect size of array ITypeInfo_GetNames returns.
---
 programs/oleview/typelib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index 64e3084..91c1775 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -531,10 +531,10 @@ int EnumFuncs(ITypeInfo *pTypeInfo, int 
         AddToTLDataStrW(tld, bstrName);
         AddToTLDataStrW(tld, wszOpenBrackets2);
 
-        for(j=0; j<pFuncDesc->cParams; j++)
+        for(j=0; j<namesNo-1; j++)
         {
             if(j != 0) AddToTLDataStrW(tld, wszComa);
-            if(pFuncDesc->cParams != 1)
+            if(namesNo-1 != 1)
             {
                 AddToTLDataStrW(tld, wszNewLine);
                 AddSpaces(tld, tabSize);
-- 
1.4.1



More information about the wine-patches mailing list