Author: giles
Date: 2008-03-31 16:08:41 -0700 (Mon, 31 Mar 2008)
New Revision: 8615

Modified:
   trunk/gs/src/zfjpx.c
Log:
Do not invoke the s_jpxd_template set_defaults method if it is null.
Fixes bug 689743, whose attachment segfaults with the luratech decoder
for which this method is not implemented.


Modified: trunk/gs/src/zfjpx.c
===================================================================
--- trunk/gs/src/zfjpx.c	2008-03-31 23:00:55 UTC (rev 8614)
+++ trunk/gs/src/zfjpx.c	2008-03-31 23:08:41 UTC (rev 8615)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2006 Artifex Software, Inc.
+/* Copyright (C) 2001-2008 Artifex Software, Inc.
    All Rights Reserved.
   
    This software is provided AS-IS with no warranty, either express or
@@ -48,7 +48,8 @@
     stream_jpxd_state state;
 
     /* it's our responsibility to call set_defaults() */
-    (*s_jpxd_template.set_defaults)((stream_state *)&state);
+    if (s_jpxd_template.set_defaults)
+      (*s_jpxd_template.set_defaults)((stream_state *)&state);
     state.jpx_memory = imemory->non_gc_memory;
     if (r_has_type(op, t_dictionary)) {
         check_dict_read(*op);

_______________________________________________
gs-cvs mailing list
gs-cvs@ghostscript.com
http://www.ghostscript.com/mailman/listinfo/gs-cvs
