tools/tiff2bw.c:91: error: Integer Overflow L2
  ([0, `n`] - 1):unsigned32.

tools/tiff2bw.c:86:1: <LHS trace>
84. }
85. 
86. static void
    ^
87. compresspalette(unsigned char* out, unsigned char* data, uint32 n, uint16* rmap, uint16* gmap, uint16* bmap)
88. {

tools/tiff2bw.c:86:1: Parameter `n`
84. }
85. 
86. static void
    ^
87. compresspalette(unsigned char* out, unsigned char* data, uint32 n, uint16* rmap, uint16* gmap, uint16* bmap)
88. {

tools/tiff2bw.c:91:9: Binary operation: ([0, n] - 1):unsigned32
89. 	register int v, red = RED, green = GREEN, blue = BLUE;
90. 
91. 	while (n-- > 0) {
            ^
92. 		unsigned int ix = *data++;
93. 		v = red*rmap[ix];
