Fix for bug #1687144 added
This commit is contained in:
parent
38169b315b
commit
e98e8a3555
28
ghostscript-subclassing-devices-fix-put_image-method.patch
Normal file
28
ghostscript-subclassing-devices-fix-put_image-method.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From fae21f1668d2b44b18b84cf0923a1d5f3008a696 Mon Sep 17 00:00:00 2001
|
||||
From: Ken Sharp <ken.sharp@artifex.com>
|
||||
Date: Tue, 4 Dec 2018 21:31:31 +0000
|
||||
Subject: subclassing devices - fix put_image method
|
||||
|
||||
The subclassing devices need to change the 'memory device' parameter to
|
||||
be the child device, when its the same as the subclassing device.
|
||||
|
||||
Otherwise we end up trying to access the child device's memory pointers
|
||||
in the subclassing device, which may not contain valid copies of
|
||||
those pointers.
|
||||
|
||||
diff --git a/base/gdevsclass.c b/base/gdevsclass.c
|
||||
index d9c85d2e4..51092585a 100644
|
||||
--- a/base/gdevsclass.c
|
||||
+++ b/base/gdevsclass.c
|
||||
@@ -797,7 +797,10 @@ int default_subclass_put_image(gx_device *dev, gx_device *mdev, const byte **buf
|
||||
int alpha_plane_index, int tag_plane_index)
|
||||
{
|
||||
if (dev->child)
|
||||
- return dev_proc(dev->child, put_image)(dev->child, mdev, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
|
||||
+ if (dev == mdev)
|
||||
+ return dev_proc(dev->child, put_image)(dev->child, dev->child, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
|
||||
+ else
|
||||
+ return dev_proc(dev->child, put_image)(dev->child, mdev, buffers, num_chan, x, y, width, height, row_stride, alpha_plane_index, tag_plane_index);
|
||||
|
||||
return 0;
|
||||
}
|
@ -43,7 +43,7 @@
|
||||
Name: ghostscript
|
||||
Summary: Interpreter for PostScript language & PDF
|
||||
Version: 9.26
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
|
||||
License: AGPLv3+
|
||||
|
||||
@ -94,6 +94,7 @@ BuildRequires: libXt-devel
|
||||
# ---------------- last rebase that are necessary for any reason:
|
||||
#Patch000: example000.patch
|
||||
Patch000: ghostscript-cve-2019-6116.patch
|
||||
Patch001: ghostscript-subclassing-devices-fix-put_image-method.patch
|
||||
|
||||
|
||||
# Downstream patches -- these should be always included when doing rebase:
|
||||
@ -462,6 +463,9 @@ done
|
||||
# =============================================================================
|
||||
|
||||
%changelog
|
||||
* Mon Mar 11 2019 Martin Osvald <mosvald@redhat.com> - 9.26-3
|
||||
- Fix for bug #1687144 added
|
||||
|
||||
* Fri Mar 08 2019 Martin Osvald <mosvald@redhat.com> - 9.26-2
|
||||
- Fix for CVE-2019-6116 added (bug #1668888)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user