Bug 85019 - .ppd file lines with missing
.ppd file lines with missing
Status: CLOSED UPSTREAM
Product: Red Hat Public Beta
Classification: Retired
Component: cups (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-02-24 16:57 EST by Owen Taylor
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-25 12:52:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Offending PPD file (70.82 KB, text/plain)
2003-02-24 16:58 EST, Owen Taylor
no flags Details
cups-1.1.17-space.patch (437 bytes, patch)
2003-02-25 12:32 EST, Tim Waugh
no flags Details | Diff

  None (edit)
Description Owen Taylor 2003-02-24 16:57:59 EST
I'm going to attach a .ppd file (from one of the printers
we have around here) that cups misparses.

The .ppd spec says (page 23):

 The value is composed of printable 7-bit ASCII byte codes, possibly sepa-
 rated by spaces and tabs into multiple components. It is terminated by a 
 newline, or by a slash, in the case of a translation string.

Which isn't very clear about internal whitespace, but the
fact that HP shipped this file indicates that practically
speaking CUPS needs to strip it.

This causes gnome-print to crash because the ->defchoice 
for the PaperSize option doesn't point to one of the
defined PaperSize values for the print.

I'll work around this in gnome-print (and fix the crash) but
it would be good to get this fixed in the CUPS library as well.
Comment 1 Owen Taylor 2003-02-24 16:58:35 EST
Created attachment 90322 [details]
Offending PPD file
Comment 2 Owen Taylor 2003-02-24 17:00:37 EST
Since it may not be clear, the problem with this file is that
the:

*DefaultPageSize: Letter 

Has a trailing space. (I miswrote PageSize instead of PaperSize
above)
Comment 3 Tim Waugh 2003-02-25 12:32:52 EST
Created attachment 90356 [details]
cups-1.1.17-space.patch

Is this the kind of patch you're after?  I'm not quite sure how to provoke the
gnome-print crash you see.
Comment 4 Owen Taylor 2003-02-25 12:45:19 EST
No, I don't think that's the right field, the option would be (from
memory)

 PageSize Letter/Letter: <<asdfasdfa>>
          ^^^^^^^^^^^^^

While this is:

 DefaultPageSize: Letter 
                  ^^^^^^^
It's a StringValue in the terminology of the .ppd spec.
It might be best to just to send this bug upstream unless you feel
comfortable with the .ppd parsing code. I've worked around it
in gnome-print now. (So, if you are using the latest gnome-print
from the tree, it won't be possible to reproduce the problem.)

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