Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2003 10:32:53 +0200
From:      Andrey Zherebchenko <andy@leman.dn.ua>
To:        freebsd-ports@freebsd.org
Subject:   tiff-3.5.7 fax2tiff dumps core
Message-ID:  <20030318103253.A38543@leman.dn.ua>

next in thread | raw e-mail | index | archive | help

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Dear All,

After updating tiff port from 3.5.5 to 3.5.7
fax2tiff started dumps core
It is caused by small change in TIFFClientOpen

Can someone check and add this tiny patch to port ?
I wrote to sobomax@freebsd.org (maintainer) about a week ago
but got no response :(

-- 
Kind regards, Andy.

--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="fax2tiff.patch"

*** fax2tiff.c.orig	Tue Mar 11 15:08:31 2003
--- fax2tiff.c	Tue Mar 11 15:08:44 2003
***************
*** 55,60 ****
--- 55,67 ----
  int	copyFaxFile(TIFF* tifin, TIFF* tifout);
  static	void usage(void);
  
+ static toff_t
+ DummySeekProc(thandle_t fd, toff_t off, int whence)
+ {
+ 	(void) fd; (void) off; (void) whence;
+ 	return (0);
+ }
+ 
  static tsize_t
  DummyReadProc(thandle_t fd, tdata_t buf, tsize_t size)
  {
***************
*** 86,95 ****
  	extern int optind;
  	extern char* optarg;
  
  	/* smuggle a descriptor out of the library */
  	faxTIFF = TIFFClientOpen("(FakeInput)", "w", (thandle_t) -1,
! 				 DummyReadProc, DummyWriteProc,
! 				 NULL, NULL, NULL, NULL, NULL);
  	if (faxTIFF == NULL)
  		return (EXIT_FAILURE);
  	faxTIFF->tif_mode = O_RDONLY;
--- 93,105 ----
  	extern int optind;
  	extern char* optarg;
  
+ 	if (argc <= 1)	
+ 		usage();
+ 
  	/* 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;

--3MwIy2ne0vdjdPXF--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030318103253.A38543>