Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 157118 - pnmtojpeg allows both input pnm and exif data to be read from stdin
Summary: pnmtojpeg allows both input pnm and exif data to be read from stdin
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: netpbm
Version: 4
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-07 00:29 UTC by David Costanzo
Modified: 2013-07-02 23:07 UTC (History)
1 user (show)

Fixed In Version: 10.27-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-09 10:27:14 UTC


Attachments (Terms of Use)
Proposed fix (deleted)
2005-05-07 00:37 UTC, David Costanzo
no flags Details | Diff

Description David Costanzo 2005-05-07 00:29:58 UTC
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:
pnmtojpeg allows you to specify input as coming from either stdin or a file.  For both the input PNM file and the EXIF data, you can use "-" to mean stdin.  pnmtojpeg does not expect you to provide both the PNM and the EXIF on stdin.  There is some protection against this, but due to a typo, the protection does not work.

Specifically, it checks "=" as stdin for the PNM, so a command like:

  pnmtojpeg = -exif=-

Reports:

  pnmtojpeg: Cannot have both input image and exif header be from Standard Input.

But, 

  pnmtojpeg - -exif=-

Does not.


Version-Release number of selected component (if applicable):
netpbm-progs-10.27-1

How reproducible:
Always

Steps to Reproduce:
1. Execute "pnmtojpeg - -exif=-"  

Actual Results:  pnmtojpeg hangs (presumably waiting for input on stdin).

Expected Results:  pnmtojpeg reports the following error:

  pnmtojpeg: Cannot have both input image and exif header be from Standard Input.


Additional info:

I found this by code inspection.  I did not run into this naturally.

Comment 1 David Costanzo 2005-05-07 00:37:36 UTC
Created attachment 114110 [details]
Proposed fix

This fixes the typo and turns the "=" into a "-".

Comment 2 Jindrich Novy 2005-05-09 10:27:14 UTC
Fixed & rebuilt.


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