[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1590-gcc65655

[email protected] (Robin Watts)
Newsgroups gmane.comp.printing.ghostscript.cvs
Message-ID <[email protected]>
The ghostpdl branch, master has been updated
       via  cc656558a289fa28dbb491d70478fd18973b287a (commit)
       via  633c454261c95e3d1771ad93b7bd6c481119c0d0 (commit)
      from  69b066540069330a8a046039b93e1dcadecfa153 (commit)

----------------------------------------------------------------------
commit cc656558a289fa28dbb491d70478fd18973b287a
Author: Robin Watts <[email protected]>
Date:   Tue Aug 20 18:48:49 2019 +0100

    Fix crashes in RAW_DUMP debug code.
    
    Dump the buffer before freeing the device, or the pointer will no
    longer be valid.
    
    Also, don't access through ppatdev14 when we know it's NULL.

diff --git a/base/gdevp14.c b/base/gdevp14.c
index 90b5298..6a7a8a7 100644
--- a/base/gdevp14.c
+++ b/base/gdevp14.c
@@ -2056,8 +2056,6 @@ pdf14_get_buffer_information(const gx_device * dev,
             transbuff->mem = buf->memory;
             buf->data = NULL;  /* So that the buffer is not freed */
         }
-        /* Go ahead and free up the pdf14 device */
-        dev_proc(dev, close_device)((gx_device *)dev);
 #if RAW_DUMP
         /* Dump the buffer that should be going into the pattern */;
         dump_raw_buffer(buf->memory,
@@ -2067,6 +2065,8 @@ pdf14_get_buffer_information(const gx_device * dev,
                         transbuff->deep);
         global_index++;
 #endif
+        /* Go ahead and free up the pdf14 device */
+        dev_proc(dev, close_device)((gx_device *)dev);
     } else {
         /* Here we are coming from one of the fill image / pattern / mask
            operations */
@@ -2869,7 +2869,7 @@ pdf14_fill_path(gx_device *dev,	const gs_gstate *pgs,
                 } else {
                      gx_pattern_trans_t *patt_trans =
                                         pdcolor->colors.pattern.p_tile->ttrans;
-                     dump_raw_buffer(ppatdev14->ctx->memory,
+                     dump_raw_buffer(patt_trans->mem,
                                      patt_trans->rect.q.y-patt_trans->rect.p.y,
                                      patt_trans->rect.q.x-patt_trans->rect.p.x,
                                      patt_trans->n_chan,

----------------------------------------------------------------------
commit 633c454261c95e3d1771ad93b7bd6c481119c0d0
Author: Robin Watts <[email protected]>
Date:   Tue Aug 20 18:47:09 2019 +0100

    Fix deep color transparency pattern copying problem.
    
    The following test:
    
      tests/pdf/pattrans_solid_nonrect.pdf.psdcmyk16.300.1..gs
    
    among others, was showing problems, due to us treating the offset
    as bytes rather than shorts.

diff --git a/base/gxp1fill.c b/base/gxp1fill.c
index a77804a..bb4efc8 100644
--- a/base/gxp1fill.c
+++ b/base/gxp1fill.c
@@ -780,7 +780,7 @@ tile_rect_trans_simple(int xmin, int ymin, int xmax, int ymax,
     left_copy_width = left_copy_rem_end - left_copy_start;
     if (left_copy_width < 0)
         left_copy_width = 0;
-    left_copy_offset = left_copy_start-ptile->ttrans->rect.p.x;
+    left_copy_offset = (left_copy_start-ptile->ttrans->rect.p.x)<<deep;
 
     /* Now the middle part */
     num_full_tiles = (int)fastfloor((float) (w - left_width)/ (float) tile_width);


Summary of changes:
 base/gdevp14.c  | 6 +++---
 base/gxp1fill.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.