summaryrefslogtreecommitdiff
path: root/base/gsstate.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2020-02-17 15:57:47 +0000
committerChris Liddell <chris.liddell@artifex.com>2020-02-20 08:19:38 +0000
commitd26e2d1c628d88263c4d946bdaf2145a438a1416 (patch)
treec2f7aadc45cd6117e4acbcc09612574217a3a91c /base/gsstate.c
parent1faa24d998afa6ce98279f26514fe14edbd62e8e (diff)
downloadghostpdl-d26e2d1c628d88263c4d946bdaf2145a438a1416.tar.gz
Ensure the memory entry in a cloned gstate is correct.
In theory, we could end up cloning a graphics state with one allocator, then assigning the "memory" entry in the cloned state to that of the state we are cloning. In practice the two have (so far) been the same, but that is not guaranteed.
Diffstat (limited to 'base/gsstate.c')
-rw-r--r--base/gsstate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/gsstate.c b/base/gsstate.c
index 913ff7d4d..79e376280 100644
--- a/base/gsstate.c
+++ b/base/gsstate.c
@@ -1244,6 +1244,7 @@ gstate_clone(gs_gstate * pfrom, gs_memory_t * mem, client_name_t cname,
*pgs = *pfrom;
pgs->client_data = pdata;
gs_currentlineparams_inline(pgs)->dash = dash;
+ pgs->memory = mem;
gs_gstate_copied(pgs);
/* Don't do anything to clip_stack. */