1From ae1061d948d88667bdf51d47d918c4684d0f67df Mon Sep 17 00:00:00 2001 2From: Robin Watts <Robin.Watts@artifex.com> 3Date: Wed, 16 Feb 2022 15:22:50 +0000 4Subject: [PATCH] Bug 704945: Add init_device_procs entry for mem_x_device. 5 6When allocating a buffer device, we rely on an init_device_procs 7being defined for the device we are using as a prototype. Which 8device we use as a prototype depends upon the number of bits per 9pixel we are using. For bpp > 64, we use mem_x_device, which does 10not currently have an init_device_procs defined. 11 12This is a fairly hard case to tickle, as very few devices use 13more than 64 bits per pixel. The DeviceN device is one of the 14few that does, and then the problem only kicks in if the 15MaxBitmap figure is high enough (or conversely the resolution is 16low enough). 17 18 19http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=ae1061d948d88667bdf51d47d918c4684d0f67df 20Upstream-Status: Backport 21CVE: CVE-2022-2085 22Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> 23--- 24 base/gdevmx.c | 4 ++-- 25 1 file changed, 2 insertions(+), 2 deletions(-) 26 27diff --git a/base/gdevmx.c b/base/gdevmx.c 28index 08b0cbcfe..89e9ff774 100644 29--- a/base/gdevmx.c 30+++ b/base/gdevmx.c 31@@ -1,4 +1,4 @@ 32-/* Copyright (C) 2001-2021 Artifex Software, Inc. 33+/* Copyright (C) 2001-2022 Artifex Software, Inc. 34 All Rights Reserved. 35 36 This software is provided AS-IS with no warranty, either express or 37@@ -25,4 +25,4 @@ 38 39 /* The device descriptor. */ 40 const gx_device_memory mem_x_device = 41- mem_device("imagex", 256, 0, NULL); 42+ mem_device("imagex", 256, 0, mem_initialize_device_procs); 43-- 442.25.1 45