[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1713-g61c4891
[email protected] (Chris Liddell) Mon, 7 Oct 2019 19:31:22 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via 61c489110685f7cab8cbbbca7b15d9b5cb2463d0 (commit)
from 2d990b065c228802b3913602b4309165e42c08e9 (commit)
----------------------------------------------------------------------
commit 61c489110685f7cab8cbbbca7b15d9b5cb2463d0
Author: Chris Liddell <[email protected]>
Date: Mon Oct 7 18:41:10 2019 +0100
Bug 701657: Allocate "memory" device in immovable gc memory
Devices are supposed to be allocated in memory that cannot relocate (i.e.
non-gc memory or an immovable allocation). The memory device accessible from
Postscript (makeimagedevice/makewordimagedevice) was being created in regular,
relocatable gc memory.
This caused an invalid memory access when cleaning up subclassed devices, as the
one device in the chain may have moved. So switch to using an immovable
allocation.
diff --git a/base/gsdevmem.c b/base/gsdevmem.c
index 75dd568..07e5a6b 100644
--- a/base/gsdevmem.c
+++ b/base/gsdevmem.c
@@ -223,7 +223,7 @@ gs_makewordimagedevice(gx_device ** pnew_dev, const gs_matrix * pmat,
{
int code;
gx_device_memory *pnew =
- gs_alloc_struct(mem, gx_device_memory, &st_device_memory,
+ gs_alloc_struct_immovable(mem, gx_device_memory, &st_device_memory,
"gs_makeimagedevice(device)");
if (pnew == 0)
Summary of changes:
base/gsdevmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)