summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2001-09-09 16:10:37 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2001-09-09 16:10:37 +0000
commitbc63306cd1e453ce35e48829b056bcdc6f7a9033 (patch)
tree401f561bb31c3714cb78af36a90600c474935b0e
parentad4b0adcbac3d40e7f01d104df1bf0426d6d89e8 (diff)
downloadlibtiff-git-bc63306cd1e453ce35e48829b056bcdc6f7a9033.tar.gz
Resolve bug 54 - always use purify safe code
-rw-r--r--ChangeLog6
-rw-r--r--libtiff/tif_fax3.c16
2 files changed, 7 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index e10c9f25..4c743c1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2001-09-09 Frank Warmerdam <warmerdam@pobox.com>
+ * libtif/tif_fax3.c: Removed #ifdef PURIFY logic, and modified to
+ always use the "safe" version, even if there is a very slight
+ cost in performance.
+
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=54
+
* libtiff/Makefile.in: Fixed @DSOSUB_VERSION to be @DSOSUF_VERSION@
in two places.
diff --git a/libtiff/tif_fax3.c b/libtiff/tif_fax3.c
index af6d53d3..6b66bf84 100644
--- a/libtiff/tif_fax3.c
+++ b/libtiff/tif_fax3.c
@@ -1,4 +1,4 @@
-/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_fax3.c,v 1.14 2001-08-10 02:37:52 warmerda Exp $ */
+/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_fax3.c,v 1.15 2001-09-09 16:10:37 warmerda Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -45,12 +45,6 @@
#include <stdio.h>
/*
- * NB: define PURIFY if you're using purify and you want
- * to avoid some harmless array bounds complaints that
- * can happen in the _TIFFFax3fillruns routine.
- */
-
-/*
* Compression+decompression state blocks are
* derived from this ``base state'' block.
*/
@@ -402,12 +396,8 @@ _TIFFFax3fillruns(u_char* buf, uint32* runs, uint32* erun, uint32 lastx)
ZERO(n, cp);
run &= 7;
}
-#ifdef PURIFY
if (run)
cp[0] &= 0xff >> run;
-#else
- cp[0] &= 0xff >> run;
-#endif
} else
cp[0] &= ~(_fillmasks[run]>>bx);
x += runs[0];
@@ -441,12 +431,8 @@ _TIFFFax3fillruns(u_char* buf, uint32* runs, uint32* erun, uint32 lastx)
FILL(n, cp);
run &= 7;
}
-#ifdef PURIFY
if (run)
cp[0] |= 0xff00 >> run;
-#else
- cp[0] |= 0xff00 >> run;
-#endif
} else
cp[0] |= _fillmasks[run]>>bx;
x += runs[1];