Author: dreimer
Date: Wed Jul 14 17:18:49 2010
New Revision: 48044
URL:
http://svn.reactos.org/svn/reactos?rev=48044&view=rev
Log:
Fix setupapi setupcab winetest. (Samuel Serapion)
Modified:
trunk/reactos/dll/win32/setupapi/setupcab.c
Modified: trunk/reactos/dll/win32/setupapi/setupcab.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupca…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupcab.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/setupcab.c [iso-8859-1] Wed Jul 14 17:18:49 2010
@@ -518,7 +518,7 @@
SC_HSC_A my_hsc;
ERF erf;
- CHAR pszCabinet[MAX_PATH], pszCabPath[MAX_PATH], *p;
+ CHAR pszCabinet[MAX_PATH], pszCabPath[MAX_PATH], *p = NULL;
DWORD fpnsize;
BOOL ret;
@@ -528,6 +528,12 @@
if (! LoadCABINETDll())
return FALSE;
+
+ if (!CabinetFile)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
memset(&my_hsc, 0, sizeof(SC_HSC_A));
pszCabinet[0] = '\0';
@@ -584,7 +590,7 @@
UINT len;
SC_HSC_W my_hsc;
ERF erf;
- WCHAR pszCabPathW[MAX_PATH], *p;
+ WCHAR pszCabPathW[MAX_PATH], *p = NULL;
DWORD fpnsize;
BOOL ret;
@@ -594,7 +600,11 @@
if (!LoadCABINETDll())
return FALSE;
- if (!CabinetFile) return FALSE;
+ if (!CabinetFile)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
memset(&my_hsc, 0, sizeof(SC_HSC_W));