Nikolay Sivov : ole2: Fix error handling in ReadClassStg().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jan 11 08:22:28 CST 2016
Module: wine
Branch: master
Commit: 995fe92652650a708fb56c58392ed4c7679c5ae1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=995fe92652650a708fb56c58392ed4c7679c5ae1
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jan 10 21:45:48 2016 +0300
ole2: Fix error handling in ReadClassStg().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole2.dll16/ole2.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/ole2.dll16/ole2.c b/dlls/ole2.dll16/ole2.c
index 0052142..422469d 100644
--- a/dlls/ole2.dll16/ole2.c
+++ b/dlls/ole2.dll16/ole2.c
@@ -46,6 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(ole);
+#define E_INVALIDARG16 MAKE_SCODE(SEVERITY_ERROR, FACILITY_NULL, 3)
static HICON convert_icon_to_32( HICON16 icon16 )
{
@@ -296,8 +297,14 @@ HRESULT WINAPI ReadClassStg16(SEGPTR pstg, CLSID *pclsid)
TRACE("(%x, %p)\n", pstg, pclsid);
- if(pclsid==NULL)
- return E_POINTER;
+ if (!pclsid)
+ return E_INVALIDARG16;
+
+ memset(pclsid, 0, sizeof(*pclsid));
+
+ if (!pstg)
+ return E_INVALIDARG16;
+
/*
* read a STATSTG structure (contains the clsid) from the storage
*/
More information about the wine-cvs
mailing list