[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Two Debian printer driver packages unusable: c2050 and fxlinuxprint



Hi,

above-mentioned printer driver packages are currently unusable as their filter executables segfault, especially c2050 always crashes, independent of the input. The filters of fxlinuxprint at least sometimes crash.

I have fixed both, eliminating the crashes completely.

For fxlinuxprint the attached patch is the solution. The second patch improves the PPD file to make the supported printer models get explicitly listed in printer setup tools (and so make users find the driver more easily).

For c2050 you get the C source code corrected by running the following commands (you can use them to generate a patch, see also commit link below):

perl -p -i -e 's/register i\b/register int i/' c2050.c
perl -p -i -e 's/^SweepBuffer_Init\b/void SweepBuffer_Init/' c2050.c
perl -p -i -e 's/SweepBuffer_Init\s*\(\s*&blkbuffer,\s+blkbytesize\s*\)/SweepBuffer_Init(&blkbuffer, blkbytesize * 2)/' c2050.c

I have found these bugs when retro-fitting all the old printer drivers, these ones in the GhostScript Printer Application:

https://github.com/OpenPrinting/ghostscript-printer-app/
https://snapcraft.io/ghostscript-printer-app

https://github.com/OpenPrinting/ghostscript-printer-app/commit/6982b674
https://github.com/OpenPrinting/ghostscript-printer-app/commit/5d7d8582

Could you apply these fixes to the Debian packages? Thanks.

   Till
--- fxlinuxprint.ppd.orig	2021-10-18 12:49:28.877351303 +0200
+++ fxlinuxprint.ppd	2021-10-18 14:04:46.341317886 +0200
@@ -24,16 +24,130 @@
 *LanguageEncoding: ISOLatin1
 *cupsLanguages: "ja"
 *PCFileName:	"FXPDFPRN.PPD"
-*Manufacturer:	"FX"
-*Product:	"(FX Printer Driver for Linux)"
+*Manufacturer:	"Fuji Xerox"
+*Product:	"(PDF Printer)"
+*Product:	"(ApeosPort-II 3000)"
+*Product:	"(ApeosPort-II 4000)"
+*Product:	"(ApeosPort-II 5000)"
+*Product:	"(ApeosPort-II 6000)"
+*Product:	"(ApeosPort-II 7000)"
+*Product:	"(ApeosPort-II C2200)"
+*Product:	"(ApeosPort-II C3300)"
+*Product:	"(ApeosPort-II C4300)"
+*Product:	"(ApeosPort-II C5400)"
+*Product:	"(ApeosPort-II C6500)"
+*Product:	"(ApeosPort-II C7500)"
+*Product:	"(ApeosPort-III 3010)"
+*Product:	"(ApeosPort-III 4000)"
+*Product:	"(ApeosPort-III 5000)"
+*Product:	"(ApeosPort-III 6000)"
+*Product:	"(ApeosPort-III 7000)"
+*Product:	"(ApeosPort-III C2200)"
+*Product:	"(ApeosPort-III C2205)"
+*Product:	"(ApeosPort-III C3300)"
+*Product:	"(ApeosPort-III C3305)"
+*Product:	"(ApeosPort-III C4400)"
+*Product:	"(ApeosPort-III C4405)"
+*Product:	"(ApeosPort-III C5500)"
+*Product:	"(ApeosPort-III C6500)"
+*Product:	"(ApeosPort-III C7600)"
+*Product:	"(ApeosPort-IV 3070)"
+*Product:	"(ApeosPort-IV 4070)"
+*Product:	"(ApeosPort-IV 5080)"
+*Product:	"(ApeosPort-IV 6080)"
+*Product:	"(ApeosPort-IV 7080)"
+*Product:	"(ApeosPort-IV C2270)"
+*Product:	"(ApeosPort-IV C2275)"
+*Product:	"(ApeosPort-IV C3370)"
+*Product:	"(ApeosPort-IV C3375)"
+*Product:	"(ApeosPort-IV C4470)"
+*Product:	"(ApeosPort-IV C4475)"
+*Product:	"(ApeosPort-IV C5570)"
+*Product:	"(ApeosPort-IV C5575)"
+*Product:	"(ApeosPort-IV C5580)"
+*Product:	"(ApeosPort-IV C6680)"
+*Product:	"(ApeosPort-IV C7780)"
+*Product:	"(DocuCentre C1101)"
+*Product:	"(DocuCentre C2101)"
+*Product:	"(DocuCentre-II 3000)"
+*Product:	"(DocuCentre-II 4000)"
+*Product:	"(DocuCentre-II 5000)"
+*Product:	"(DocuCentre-II 6000)"
+*Product:	"(DocuCentre-II 7000)"
+*Product:	"(DocuCentre-II C2200)"
+*Product:	"(DocuCentre-II C3300)"
+*Product:	"(DocuCentre-II C4300)"
+*Product:	"(DocuCentre-II C5400)"
+*Product:	"(DocuCentre-II C6500)"
+*Product:	"(DocuCentre-II C7500)"
+*Product:	"(DocuCentre-III 2000)"
+*Product:	"(DocuCentre-III 3000)"
+*Product:	"(DocuCentre-III 3010)"
+*Product:	"(DocuCentre-III 4000)"
+*Product:	"(DocuCentre-III 5000)"
+*Product:	"(DocuCentre-III 6000)"
+*Product:	"(DocuCentre-III 7000)"
+*Product:	"(DocuCentre-III C2200)"
+*Product:	"(DocuCentre-III C2205)"
+*Product:	"(DocuCentre-III C3300)"
+*Product:	"(DocuCentre-III C3305)"
+*Product:	"(DocuCentre-III C4400)"
+*Product:	"(DocuCentre-III C4405)"
+*Product:	"(DocuCentre-III C5500)"
+*Product:	"(DocuCentre-III C6500)"
+*Product:	"(DocuCentre-III C7600)"
+*Product:	"(DocuCentre-IV 2060)"
+*Product:	"(DocuCentre-IV 3060)"
+*Product:	"(DocuCentre-IV 3070)"
+*Product:	"(DocuCentre-IV 4070)"
+*Product:	"(DocuCentre-IV 5080)"
+*Product:	"(DocuCentre-IV 6080)"
+*Product:	"(DocuCentre-IV 7080)"
+*Product:	"(DocuCentre-IV C2260)"
+*Product:	"(DocuCentre-IV C2263)"
+*Product:	"(DocuCentre-IV C2263N)"
+*Product:	"(DocuCentre-IV C2270)"
+*Product:	"(DocuCentre-IV C2275)"
+*Product:	"(DocuCentre-IV C3370)"
+*Product:	"(DocuCentre-IV C3375)"
+*Product:	"(DocuCentre-IV C4470)"
+*Product:	"(DocuCentre-IV C4475)"
+*Product:	"(DocuCentre-IV C5570)"
+*Product:	"(DocuCentre-IV C5575)"
+*Product:	"(DocuCentre-IV C5580)"
+*Product:	"(DocuCentre-IV C6680)"
+*Product:	"(DocuCentre-IV C7780)"
+*Product:	"(DocuPrint 2060)"
+*Product:	"(DocuPrint 3000)"
+*Product:	"(DocuPrint 3000s)"
+*Product:	"(DocuPrint 3050)"
+*Product:	"(DocuPrint 3100)"
+*Product:	"(DocuPrint 4050)"
+*Product:	"(DocuPrint 4060)"
+*Product:	"(DocuPrint 5060)"
+*Product:	"(DocuPrint C2250)"
+*Product:	"(DocuPrint C3050)"
+*Product:	"(DocuPrint C3350)"
+*Product:	"(DocuPrint C3350s)"
+*Product:	"(DocuPrint C3360)"
+*Product:	"(DocuPrint C4000d)"
+*Product:	"(DocuPrint C5000d)"
+*Product:	"(D95)"
+*Product:	"(D110)"
+*Product:	"(D110 Light Publisher)"
+*Product:	"(D125 Light Publisher)"
+*Product:	"(D136 Light Publisher)"
+*Product:	"(4112)"
+*Product:	"(4112 Light Publisher)"
+*Product:	"(4127 Light Publisher)"
 *cupsVersion:	1.2
 *cupsManualCopies: True
 *cupsModelNumber:  2
 *cupsFilter:	"application/vnd.cups-pdfprintfx 0 pdftopjlfx"
 *cupsFilter:	"application/vnd.cups-postscript 0 pstopdffx"
-*ShortNickName: "FX Printer Driver for Linux"
-*ModelName: "FX Printer Driver for Linux"
-*NickName: "FX Printer Driver for Linux"
+*ShortNickName: "Fuji Xerox PDF Printer"
+*ModelName:     "Fuji Xerox PDF Printer"
+*NickName:      "Fuji Xerox PDF Printer"
 *PSVersion:	"(3010.000) 550"
 *PSVersion:	"(3010.000) 651"
 *PSVersion:	"(3010.000) 652"
--- fxlinuxprint.c.orig	2021-10-19 09:40:20.246591165 +0200
+++ fxlinuxprint.c	2021-10-19 10:43:25.611115379 +0200
@@ -361,24 +361,19 @@
 int fxGetPrintOptions (int argc, const char* argv[], LPFX_OPTION_T opt)
 {
 	const char			*file_name;
-	int 				num_dests;
 	int 				i;
 	int 				j;
 	int					num_options;
 	int					myalloc;
 	cups_option_t		*p_options;
-	cups_dest_t			*dest;
-	cups_dest_t			*dests;
 	ppd_choice_t		*p_choice;
 	ppd_file_t			*p_ppd;
 	LPFX_PPD_OPT_CHOICE	p_option;
 
-	// get destination printer
-	num_dests = cupsGetDests (&dests);
-	dest = cupsGetDest (NULL, NULL, num_dests, dests);
-	file_name = cupsGetPPD (dest->name);
-
-	cupsFreeDests (num_dests, dests);
+	// Get PPD file name
+	file_name = getenv("PPD");
+	if (!file_name)
+	  return (1);
 
 	// get options
 	strcpy ( opt->job_name, argv[3]);
@@ -442,10 +437,6 @@
 	}
 	cupsFreeOptions (num_options, p_options);
 
-	// delete temp file
-	unlink (file_name);
-
-
 	return (0);
 }
 
--- fxlinuxprint.h.orig	2021-10-19 10:48:20.897020964 +0200
+++ fxlinuxprint.h	2021-10-19 10:49:08.005324623 +0200
@@ -23,7 +23,7 @@
 //-------- definitions -------------------------
 #define		PDF_FILE_NAME  	"/tmp/tmp_fxpdfXXXXXX"
 
-#define		MAX_STR_SIZE		64
+#define		MAX_STR_SIZE		256
 #define		MAX_FILE_NAME_SIZE	128
 #define		MAX_DECODE_BUF_SIZE	256
 #define		READ_DATA_SIZE		(1024*256)

Reply to: