Hi,
Issue found by Coverity Scan.
CID 259200 (#4 of 4): Dereference null return value (NULL_RETURNS)
dereference: Dereferencing a null pointer cb.

--- a\src\win\iupwin_filedlg.c  Mon Dec 11 14:52:42 2017
+++ b\src\win\iupwin_filedlg.c  Wed Jan 24 22:56:29 2018
@@ -548,7 +548,10 @@
       Ihandle* ih = (Ihandle*)GetWindowLongPtr(hWnd, DWLP_USER);
       /* callback here always exists */
       IFnss cb = (IFnss)IupGetCallback(ih, "FILE_CB");
-      cb(ih, NULL, "FINISH");
+      if (cb)
+      {
+        cb(ih, NULL, "FINISH");
+      }
       break;
     }
   case WM_XBUTTONDBLCLK:

Best,
Ranier Vilela

Attachment: iupwin_filedlg.patch
Description: iupwin_filedlg.patch

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to