AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
October 1999

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

1999.10.04 17:05 "libtiff problems with Group 4", by Joel Schumacher
1999.10.05 09:13 "Re: libtiff problems with Group 4", by Frank D Cringle
1999.10.06 22:33 "Re: libtiff problems with Group 4", by Kevin D Quitt
1999.10.07 10:41 "Re: libtiff problems with Group 4", by Frank D Cringle
1999.10.07 15:02 "Re: libtiff problems with Group 4", by Frank D Cringle

1999.10.07 15:02 "Re: libtiff problems with Group 4", by Frank D Cringle

"Kevin D. Quitt" <Kevin@Quitt.net> writes:
> --- On 07 Oct 1999 12:41:49 +0200  "Frank D. Cringle" <fdc@cliwe.ping.de> wrote:
> 
> >"Kevin D. Quitt" <Kevin@Quitt.net> writes:
> >> >+		NeedBits(13);
> >> 
> >> You neglected the definition of NeedBits.
> >
> >Sorry.  I misspelt it.  It should read
> >
> >>+		NeedBits16(13);
> >
> 
> But NeedBits16 takes two parameters.

Darn.  OK, Sam renamed it and gave it a label for when it falls off
the end of the data.  Here's the whole patch again...

================================================================
diff -uNr tiff-v3.4/libtiff/tif_fax3.c tiff-v3.4.new/libtiff/tif_fax3.c
--- tiff-v3.4/libtiff/tif_fax3.c	Tue Apr 30 00:16:27 1996
+++ tiff-v3.4.new/libtiff/tif_fax3.c	Thu Oct  7 16:55:33 1999
@@ -1382,6 +1382,13 @@
 			tif->tif_row++;
 		continue;
 	EOFG4:
+		NeedBits16(13, BADG4);
+	BADG4:
+#ifdef FAX3_DEBUG
+		if (GetBits(13) != 0x1001)
+		  fputs("Bad RTC\n", stderr);
+#endif
+		ClrBits(13);
 		(*sp->fill)(buf, thisrun, pa, lastx);
 		UNCACHE_STATE(tif, sp);
 		return (-1);
diff -uNr tiff-v3.4/libtiff/tif_fax3.h tiff-v3.4.new/libtiff/tif_fax3.h
--- tiff-v3.4/libtiff/tif_fax3.h	Tue Apr 30 00:16:28 1996
+++ tiff-v3.4.new/libtiff/tif_fax3.h	Tue Oct  5 11:05:07 1999
@@ -485,9 +485,10 @@
 	    goto eol2d;							\
 	case S_EOL:							\
 	    *pa++ = lastx - a0;						\
-	    NeedBits8(5,eof2d);						\
-	    if (GetBits(5))						\
+	    NeedBits8(4,eof2d);						\
+	    if (GetBits(4))						\
 		unexpected("EOL", a0);					\
+	    ClrBits(4);							\
 	    EOLcnt = 1;							\
 	    goto eol2d;							\
 	default:							\


-- 
Frank Cringle,      fdc@cliwe.ping.de
voice: (+49 2304) 467101; fax: 943357