Bug 55634 - lpq (lpr-0.50.1-1) segfaults when trying to access a queue with entries in it.
Summary: lpq (lpr-0.50.1-1) segfaults when trying to access a queue with entries in it.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: lpr
Version: 6.2
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-03 12:28 UTC by Michael McConnell
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-12-18 22:43:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael McConnell 2001-11-03 12:28:54 UTC
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):


How reproducible:
Always

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
empty.)
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.

Additional info:

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

Comment 1 Michael McConnell 2001-11-03 12:31:52 UTC
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.

Comment 2 Kuszmaul, Bradley 2001-11-05 06:16:26 UTC
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.
 ftp://updates.redhat.com/6.2/en/os/i386/lpr-0.50-7.6.x.i386.rpm


Comment 3 Fabrice Bellet 2001-11-06 09:53:45 UTC
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 @@
 
		warn();
 
	else {
 
		/* get daemon pid */
+
		cp = current;
 
		ep = cp + sizeof(current) - 1;
 
		while ((c = getc(fp)) != EOF && c != '\n' && cp < ep)
 
			cp++;


Comment 4 Crutcher Dunnavant 2001-11-07 03:36:45 UTC
Grumble. Will fix (again).

Comment 5 Tim Waugh 2002-01-10 11:54:01 UTC
This is fixed now.



Note You need to log in before you can comment on or make changes to this bug.