Red Hat Bugzilla – Bug 55634
lpq (lpr-0.50.1-1) segfaults when trying to access a queue with entries in it.
Last modified: 2007-04-18 12:38:00 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.78 [en] (X11; U; Linux 2.2.19 i586)
Description of problem:
lpq crashes with a segmentation fault when trying to query entries in a
printer queue when there are entries in it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Print something (e.g. RHS Printtool -> Tests -> Print Postscript test
page) with printer switched off. (This will make sure the queue can't
2. At a shell: lpq -Plpc
Actual Results: Segmentation fault.
(no other information given)
Expected Results: An entry detailing the entry in the queue, who sent it
and how big it is.
Occured both with the RHLinux compiled binary package, and a package
recompiled locally from the source RPM.
This is with lpr-0.50.1-1
My printer configuration:
Epson Stylus Color 880, connected via parallel port.
Using Epson Stylus Color (UP) driver on /dev/lp0,
with rhs-printfilters-1.63-4.rh6.2.i386.rpm installed.
I get the same behavior (segfault) for a remote lpd printer.
Going back from package lpr-0.50.1-1 to lpr-0.50-7.6.x fixed the problem.
This line has been lost from previous lpr-0.50 version. This makes sense,
when cp here previously has a NULL value taken from the
(cp = checkremote()) assignment fews lines above.
--- lpr-0.50.1/common_source/displayq.c.bak Tue Nov 6 10:40:59 2001
+++ lpr-0.50.1/common_source/displayq.c Tue Nov 6 10:41:15 2001
@@ -159,6 +159,7 @@
/* get daemon pid */
cp = current;
ep = cp + sizeof(current) - 1;
while ((c = getc(fp)) != EOF && c != '\n' && cp < ep)
Grumble. Will fix (again).
This is fixed now.