summaryrefslogtreecommitdiff
path: root/base/gsovrc.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2022-09-19 12:19:33 +0100
committerRobin Watts <Robin.Watts@artifex.com>2022-09-19 12:44:06 +0100
commit80cf1d230aeb09eac4a6087213cf3a378954da79 (patch)
treef11df86725895742648156cbe5e52c25ed434710 /base/gsovrc.c
parent90fa745b793dc439d59bdab2255867fb7dfb5420 (diff)
downloadghostpdl-80cf1d230aeb09eac4a6087213cf3a378954da79.tar.gz
Bug 705260 continued: Fix SEGVs seen in cluster testing.
Don't dereference something that's not a pointer. I have no idea how this passed testing, or why it has only started cauing crashes recently, but clearly if I'm passing values that are -1, 0 or 1, use them as is, don't dereference them.
Diffstat (limited to 'base/gsovrc.c')
-rw-r--r--base/gsovrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/gsovrc.c b/base/gsovrc.c
index 8447ba753..574e1e2e3 100644
--- a/base/gsovrc.c
+++ b/base/gsovrc.c
@@ -1307,8 +1307,8 @@ overprint_dev_spec_op(gx_device* pdev, int dev_spec_op,
if (dev_spec_op == gxdso_overprint_op)
{
int ret = opdev->op_state;
- if (*(int *)data >= 0)
- opdev->op_state = *(int *)data;
+ if ((intptr_t)data >= 0)
+ opdev->op_state = (intptr_t)data;
return ret;
}