Bug 157118 - pnmtojpeg allows both input pnm and exif data to be read from stdin
pnmtojpeg allows both input pnm and exif data to be read from stdin
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
4
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jindrich Novy
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-06 20:29 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:
Environment:
Last Closed: 2005-05-09 06:27:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed fix (511 bytes, patch)
2005-05-06 20:37 EDT, David Costanzo
no flags Details | Diff

  None (edit)
Description David Costanzo 2005-05-06 20:29:58 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:
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-06 20:37:36 EDT
Created attachment 114110 [details]
Proposed fix

This fixes the typo and turns the "=" into a "-".
Comment 2 Jindrich Novy 2005-05-09 06:27:14 EDT
Fixed & rebuilt.

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