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..d879788 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -2810,7 +2810,6 @@ extractContigSamples8bits (uint8 *in, uint8 *out, uint32 cols, ready_bits = 0; maskbits = (uint8)-1 >> ( 8 - bps); - buff1 = buff2 = 0; for (col = start; col < end; col++) { /* Compute src byte(s) and bits within byte(s) */ bit_offset = col * bps * spp;