Jeff Latimer : cabinet: Fix a potential NULL reference.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 28 08:08:05 CDT 2007


Module: wine
Branch: master
Commit: 33af21fdcf368c1afb3b24ded32bb4b7afcfd76c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=33af21fdcf368c1afb3b24ded32bb4b7afcfd76c

Author: Jeff Latimer <lats at yless4u.com.au>
Date:   Wed Jun 27 22:10:38 2007 +1000

cabinet: Fix a potential NULL reference.

---

 dlls/cabinet/fci.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c
index 112c06b..b5e6c9c 100644
--- a/dlls/cabinet/fci.c
+++ b/dlls/cabinet/fci.c
@@ -173,7 +173,11 @@ HFCI __cdecl FCICreate(
   int err;
   PFCI_Int p_fci_internal;
 
-  if ((!perf) || (!pfnalloc) || (!pfnfree) || (!pfnopen) || (!pfnread) ||
+  if (!perf) {
+    SetLastError(ERROR_BAD_ARGUMENTS);
+    return NULL;
+  }
+  if ((!pfnalloc) || (!pfnfree) || (!pfnopen) || (!pfnread) ||
       (!pfnwrite) || (!pfnclose) || (!pfnseek) || (!pfndelete) ||
       (!pfnfcigtf) || (!pccab)) {
     perf->erfOper = FCIERR_NONE;




More information about the wine-cvs mailing list