Subject: pkg/19306: (with fix) fax2tiff crashes
To: None <>
From: Ingolf Steinbach <>
List: netbsd-bugs
Date: 12/07/2002 01:02:20
>Number:         19306
>Category:       pkg
>Synopsis:       fax2tiff (from graphics/tiff) crashes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 06 16:03:01 PST 2002
>Originator:     Ingolf Steinbach
>Release:        NetBSD 1.6
System: NetBSD helios 1.6 NetBSD 1.6 (GENERIC) #3: Fri Nov 1 02:27:02 CET 2002 ingolf@helios:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
current graphics/tiff package
	The fax2tiff program from the graphics/tiff package crashes.
This is due to a 0-pointer dereference which can be avoided by including
the patch below.
	Just run the program without any parameters.
	Add the following patch to the patches directory:

--- tools/fax2tiff.c.orig	Fri Jan 28 22:18:16 2000
+++ tools/fax2tiff.c
@@ -69,6 +69,13 @@ DummyWriteProc(thandle_t fd, tdata_t buf
 	return (size);
+static toff_t
+DummySeekProc(thandle_t fd, toff_t offset, int whence)
+	(void) fd; (void) offset; (void) whence;
+	return (0);
 main(int argc, char* argv[])
@@ -89,7 +96,7 @@ main(int argc, char* argv[])
 	/* smuggle a descriptor out of the library */
 	faxTIFF = TIFFClientOpen("(FakeInput)", "w", (thandle_t) -1,
 				 DummyReadProc, DummyWriteProc,
+				 DummySeekProc, NULL, NULL, NULL, NULL);
 	if (faxTIFF == NULL)
 		return (EXIT_FAILURE);
 	faxTIFF->tif_mode = O_RDONLY;