Author: paultcochrane
Date: Sat Oct  6 04:48:06 2007
New Revision: 21913

Modified:
   trunk/src/embed.c

Log:
[core] Checking that fullname isn't NULL before being passes as a function
argument.  This is an extra check just in case; found in Coverity CID 124.


Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c   (original)
+++ trunk/src/embed.c   Sat Oct  6 04:48:06 2007
@@ -378,6 +378,12 @@
 
 #ifdef PARROT_HAS_HEADER_SYSMMAN
 
+        /* check that fullname isn't NULL, just in case */
+        if (!fullname) {
+            real_exception(interp, NULL, 1,
+                    "About to try and open a NULL filename");
+        }
+
         fd = open(fullname, O_RDONLY | O_BINARY);
         if (!fd) {
             PIO_eprintf(interp, "Parrot VM: Can't open %s, code %i.\n",

Reply via email to