diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c index 82a5d84..3563f30 100644 --- a/tools/tiff2ps.c +++ b/tools/tiff2ps.c @@ -2964,7 +2964,9 @@ tsize_t Ascii85EncodeBlock( uint8 * ascii85_p, unsigned f_eod, const uint8 * raw if ( val32 == 0 ) /* Special case */ { - ascii85_p[ascii85_l] = 'z'; + if(ascii85_p != NULL) { + ascii85_p[ascii85_l] = 'z'; + } rc = 1; } diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 722b132..470a18d 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -958,7 +958,6 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf, return 1; } } - prev_trailing_bits += trailing_bits; /* if (prev_trailing_bits > 7) */ /* prev_trailing_bits-= 8; */ } diff --git a/tools/tiffdump.c b/tools/tiffdump.c index 3de0062..cb69187 100644 --- a/tools/tiffdump.c +++ b/tools/tiffdump.c @@ -229,7 +229,7 @@ dump(int fd, uint64 diroff) else Fatal("Not a TIFF file, bad version number %u (%#x)", hdr.common.tiff_version, hdr.common.tiff_version); - for (i = 0; diroff != 0; i++) { + for (i = 0; visited_diroff && (diroff != 0); i++) { for(j=0; j