Bug 67240 - tiffcp exits with abnormal status upon success
Summary: tiffcp exits with abnormal status upon success
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libtiff
Version: 7.3
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-21 14:27 UTC by Jay Berkenbilt
Modified: 2015-03-05 01:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-06-21 14:42:31 UTC
Embargoed:


Attachments (Terms of Use)
tiff file (847 bytes, image/tiff)
2002-06-21 14:27 UTC, Jay Berkenbilt
no flags Details
patch to tiffcp.c that repairs this problem (179 bytes, patch)
2002-06-21 14:40 UTC, Jay Berkenbilt
no flags Details | Diff
patch to be applied from /usr/src/redhat to extracted source rpm (1.38 KB, patch)
2002-06-21 14:42 UTC, Jay Berkenbilt
no flags Details | Diff

Description Jay Berkenbilt 2002-06-21 14:27:08 UTC
Description of Problem:

tiffcp exits with error code 2 even when it succeeds.

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

libtiff-3.5.7-2

How Reproducible:

seemingly always

Steps to Reproduce:
1. tiffcp 1.tif 2.tif
2. echo $?

Actual Results:

tiffcp succeeds; 2.tif is valid.  echo $? results in "2"

Expected Results:

$? should be 0

Additional Information:
	
This was not broken in RedHat 7.1 or 7.2.
I consider the severity "high" because this makes it very hard to use tiffcp in
scripts reliably.  There's no good workaround.  A bad workaround is to make sure
tiffcp didn't generate any output, but that's not really reliable.

Just in case, I'm attaching my 1.tif file, though I have had this problem with
every tiff file I've looked at.

Comment 1 Jay Berkenbilt 2002-06-21 14:27:49 UTC
Created attachment 62044 [details]
tiff file

Comment 2 Jay Berkenbilt 2002-06-21 14:39:09 UTC
I'm attaching two patches: one to tiffcp.c that fixes the problem (which is just
failure to return 0 from the end of main), and one that can be applied from
/usr/src/redhat after installing the source RPM.  The second patch modifies the
spec file and creates the new diff.  The first patch is embedded in it.  I've
changed the rpm release to 2.1.  You would no doubt want to change it to 3 or
whatever is current.


Comment 3 Jay Berkenbilt 2002-06-21 14:40:26 UTC
Created attachment 62045 [details]
patch to tiffcp.c that repairs this problem

Comment 4 Jay Berkenbilt 2002-06-21 14:42:25 UTC
Created attachment 62046 [details]
patch to be applied from /usr/src/redhat to extracted source rpm

Comment 5 Phil Knirsch 2002-06-25 14:15:56 UTC
Thanks for the very detailed bug report and the actual patch to fix the problem.

Your patch is included in the latest rawhide build of libtiff-3.5.7-6.

Read ya, Phil


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