summaryrefslogtreecommitdiff
path: root/base/gdevmpla.c
diff options
context:
space:
mode:
authorJulian Smith <jules@op59.net>2020-01-29 15:10:06 +0000
committerJulian Smith <jules@op59.net>2020-01-29 16:19:30 +0000
commit3b2ae21ca594934728f623667db1a002286193ea (patch)
tree7ed703a1f86a252d6973f66521180d5064faf373 /base/gdevmpla.c
parentf6f8b8de526266eebd850e43bf1d0037b6f62e4c (diff)
downloadghostpdl-3b2ae21ca594934728f623667db1a002286193ea.tar.gz
Fix plane_strip_copy_rop() to use correct color depth when processing the plane.
Temporarily change mdev->color_info.depth to mdev->planes[plane].depth so that things work when we process the plane. E.g. this fixes bug where mem_gray8_rgb24_strip_copy_rop() was overwriting into the line_ptrs[] array. Fixes segv in: ./bin/gs -sOutputFile=foo -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -dMaxBitmap=10000 -sDEVICE=psdrgb -r300 -Z: -sDEFAULTPAPERSIZE=letter -dNOPAUSE -dBATCH -K2000000 -dClusterJob -dJOBSERVER ../fts_27_2709.pdf
Diffstat (limited to 'base/gdevmpla.c')
-rw-r--r--base/gdevmpla.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/gdevmpla.c b/base/gdevmpla.c
index 3bcbf4916..ae805f4eb 100644
--- a/base/gdevmpla.c
+++ b/base/gdevmpla.c
@@ -1718,6 +1718,8 @@ plane_strip_copy_rop(gx_device_memory * mdev,
* so ensure we have the right ones in there. */
set_dev_proc(mdev, get_bits_rectangle, dev_proc(mdproto, get_bits_rectangle));
set_dev_proc(mdev, fill_rectangle, dev_proc(mdproto, fill_rectangle));
+ /* mdev->color_info.depth is restored by MEM_RESTORE_PARAMS below. */
+ mdev->color_info.depth = mdev->planes[plane].depth;
code = dev_proc(mdproto, strip_copy_rop)((gx_device *)mdev, sdata, sourcex, sraster,
id, scolors, textures, tcolors,
x, y, width, height,