[gs-cvs] rev 9069 - trunk/gs/base

ken at ghostscript.com ken at ghostscript.com
Thu Sep 4 03:05:55 PDT 2008


Author: ken
Date: 2008-09-04 03:05:54 -0700 (Thu, 04 Sep 2008)
New Revision: 9069

Modified:
   trunk/gs/base/gdevpdfm.c
Log:
More minor issues reported by Coverity. An unchecked return code from cos_dict_find_c_key,
and some dead code.

Expected Differences:
None.


Modified: trunk/gs/base/gdevpdfm.c
===================================================================
--- trunk/gs/base/gdevpdfm.c	2008-09-04 10:04:10 UTC (rev 9068)
+++ trunk/gs/base/gdevpdfm.c	2008-09-04 10:05:54 UTC (rev 9069)
@@ -506,6 +506,8 @@
 	    pdfmark_put_pair(pcd, pair);
 	    /* Break const so we can update the (copied) string. */
 	    pcv = (cos_value_t *)cos_dict_find_c_key(pcd, "/Contents");
+	    if (pcv == NULL)
+	        return_error(gs_error_ioerror); /* shouldn't be possible */
 	    cstr = pcv->contents.chars.data;
 	    /* Loop invariant: j <= i < csize. */
 	    for (i = j = 0; i < csize;)
@@ -1579,8 +1581,6 @@
     if (code < 0)
 	return 0;
     gs_free_const_string(pdev->memory, objname.data, objname.size, "pdfmark_EP");
-    if (code < 0)
-	return code;
     return 0;
 }
 



More information about the gs-cvs mailing list