Nikolay Sivov : oleview: Fix some crashes on unnamed methods/arguments.
Alexandre Julliard
julliard at winehq.org
Mon Jan 3 10:58:04 CST 2011
Module: wine
Branch: master
Commit: f88d7bc8ca2e67d4b04870dc6295aaf04661c4b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f88d7bc8ca2e67d4b04870dc6295aaf04661c4b5
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jan 2 16:05:10 2011 +0300
oleview: Fix some crashes on unnamed methods/arguments.
---
programs/oleview/typelib.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index 771305f..d2d6d00 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -631,7 +631,7 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen
AddToTLDataStrW(tld, wszStdCall);
AddToTLDataStrW(tld, wszSpace);
}
- AddToTLDataStrW(tld, bstrName);
+ if (bstrName) AddToTLDataStrW(tld, bstrName);
AddToTLDataStrW(tld, wszOpenBrackets2);
for(j=0; j<pFuncDesc->cParams; j++)
@@ -701,8 +701,11 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen
AddToTLDataStrW(tld, wszAfter);
AddToTLDataStrW(tld, wszSpace);
if (j+1 < namesNo) {
- AddToTLDataStrW(tld, bstrParamNames[j+1]);
- SysFreeString(bstrParamNames[j+1]);
+ if (bstrParamNames[j+1])
+ {
+ AddToTLDataStrW(tld, bstrParamNames[j+1]);
+ SysFreeString(bstrParamNames[j+1]);
+ }
} else {
AddToTLDataStrW(tld, szRhs);
}
More information about the wine-cvs
mailing list