Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 157106 - bmptopnm reports filenames as "Standard Input" when reporting read errors
bmptopnm reports filenames as "Standard Input" when reporting read errors
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2005-05-06 17:13 EDT by David Costanzo
Modified: 2013-07-02 19:07 EDT (History)
1 user (show)

See Also:
Fixed In Version: 10.27-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-09 06:27:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (469 bytes, patch)
2005-05-06 17:22 EDT, David Costanzo
no flags Details | Diff

  None (edit)
Description David Costanzo 2005-05-06 17:13:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.7.7-2

Description of problem:
bmptopnm reports filenames as "Standard Input" when reporting read errors.  Instead, it should report the actual filename.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create an invalid bitmap with "touch invalid.bmp"
2. Execute "bmptopnm invalid.bmp"

Actual Results:  bmptopnm prints out:

  bmptopnm: Standard Input: read error

Expected Results:  bmptopnm prints out:

  bmptopnm: invalid.bmp: read error

Additional info:
Comment 1 David Costanzo 2005-05-06 17:22:55 EDT
Created attachment 114100 [details]
proposed patch

The fix is to inverted the condition in an if statement that used strcmp().

I did a quick grep of the tree too look for other bugs like this one.  Other
other uses look good.  Except there was one suspicious usage in

  if (strcmp(cmdline_p->input_filespec, "=") == 0 &&

It should probably be:

  if (strcmp(cmdline_p->input_filespec, "-") == 0 &&

I will report this as a separate bug.
Comment 2 David Costanzo 2005-05-06 17:31:57 EDT
Oops!  I forgot to include the package version: netpbm-progs-10.27-1
Comment 3 Jindrich Novy 2005-05-09 06:27:35 EDT
Fixed. Thanks.

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