oleaut32: Added insufficient memory check to
ITypelib2:GetDocumentation2
Benjamin Arai
me at benjaminarai.com
Tue Aug 15 21:23:52 CDT 2006
Hi,
ChangeLog:
- Added insufficient memory check to ITypelib2::GetDocumentation2
- Returns MSDN specified value STG_E_INSUFFICIENTMEMORY
---
dlls/oleaut32/typelib.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Licence: LGPL
Copyright: Google 2006
--
Benjamin Arai
http://www.benjaminarai.com
-------------- next part --------------
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index d75b665..8e197e6 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3985,11 +3985,19 @@ static HRESULT WINAPI ITypeLib2_fnGetDoc
{
/* documentation for the typelib */
if(pbstrHelpString)
+ {
*pbstrHelpString=SysAllocString(This->DocString);
+ if(!*pbstrHelpString)
+ return STG_E_INSUFFICIENTMEMORY;
+ }
if(pdwHelpStringContext)
*pdwHelpStringContext=This->dwHelpContext;
if(pbstrHelpStringDll)
+ {
*pbstrHelpStringDll=SysAllocString(This->HelpStringDll);
+ if(!pbstrHelpStringDll)
+ return STG_E_INSUFFICIENTMEMORY;
+ }
result = S_OK;
}
--
1.4.0
More information about the wine-patches
mailing list