| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread1999.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
|
|||||||