Author: paultcochrane
Date: Sat Oct  6 03:55:24 2007
New Revision: 21911

Modified:
   trunk/compilers/imcc/main.c

Log:
[imcc] Checking for a null output file before writing the output PBC.
Possible problem picked up by Coverity CID 125.


Modified: trunk/compilers/imcc/main.c
==============================================================================
--- trunk/compilers/imcc/main.c (original)
+++ trunk/compilers/imcc/main.c Sat Oct  6 03:55:24 2007
@@ -832,6 +832,10 @@
 
     /* Produce a PBC output file, if one was requested */
     if (write_pbc) {
+        if (!output_file) {
+            IMCC_fatal_standalone(interp, 1,
+                    "main: NULL output_file when trying to write .pbc\n");
+        }
         imcc_write_pbc(interp, output_file);
 
         /* If necessary, load the file written above */

Reply via email to