libtiff/tif_predict.c:482: error: Integer Overflow L2
  ([0, max(255, `*cp0`)] - [0, max(255, `*cp0`)]):unsigned32.

libtiff/tif_predict.c:462:1: <LHS trace>
460. }
461. 
462. static void
     ^
463. horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
464. {

libtiff/tif_predict.c:462:1: Parameter `*cp0`
460. }
461. 
462. static void
     ^
463. horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
464. {

libtiff/tif_predict.c:482:5: Assignment
480. 			unsigned  int b2 = cp[2];
481. 			do {
482. 				r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1;
         ^
483. 				g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1;
484. 				b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1;

libtiff/tif_predict.c:462:1: <RHS trace>
460. }
461. 
462. static void
     ^
463. horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
464. {

libtiff/tif_predict.c:462:1: Parameter `*cp0`
460. }
461. 
462. static void
     ^
463. horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
464. {

libtiff/tif_predict.c:478:4: Assignment
476. 		if (stride == 3) {
477. 			unsigned int r1, g1, b1;
478. 			unsigned int r2 = cp[0];
        ^
479. 			unsigned int g2 = cp[1];
480. 			unsigned  int b2 = cp[2];

libtiff/tif_predict.c:482:17: Binary operation: ([0, max(255, *cp0)] - [0, max(255, *cp0)]):unsigned32
480. 			unsigned  int b2 = cp[2];
481. 			do {
482. 				r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1;
                     ^
483. 				g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1;
484. 				b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1;

static void
horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
{
	TIFFPredictorState* sp = PredictorState(tif);
	tmsize_t stride = sp->stride;
	unsigned char* cp = (unsigned char*) cp0;
	assert((cc%stride)==0);
	if (cc > stride) {
		cc -= stride;
		if (stride == 3) {
			unsigned int r1, g1, b1;
			unsigned int r2 = cp[0];
			unsigned int g2 = cp[1];
			unsigned  int b2 = cp[2];
			do {
				r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1;
				g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1;
				b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1;
				cp += 3;
			} while ((cc -= 3) > 0);
		} else if (stride == 4) {
			unsigned int r1, g1, b1, a1;
			unsigned int r2 = cp[0];
			unsigned int g2 = cp[1];
			unsigned int b2 = cp[2];
			unsigned int a2 = cp[3];
			do {
				r1 = cp[4]; cp[4] = (unsigned char)((r1-r2)&0xff); r2 = r1;
				g1 = cp[5]; cp[5] = (unsigned char)((g1-g2)&0xff); g2 = g1;
				b1 = cp[6]; cp[6] = (unsigned char)((b1-b2)&0xff); b2 = b1;
				a1 = cp[7]; cp[7] = (unsigned char)((a1-a2)&0xff); a2 = a1;
				cp += 4;
			} while ((cc -= 4) > 0);
		} else {
			cp += cc - 1;
			do {
				REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--)
			} while ((cc -= stride) > 0);
		}
	}
}
['static void\nhorDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)\n{\n\tTIFFPredictorState* sp = PredictorState(tif);\n\ttmsize_t stride = sp->stride;\n\tunsigned char* cp = (unsigned char*) cp0;\n\tassert((cc%stride)==0);\n\tif (cc > stride) {\n\t\tcc -= stride;\n\t\tif (stride == 3) {\n\t\t\tunsigned int r1, g1, b1;\n\t\t\tunsigned int r2 = cp[0];\n\t\t\tunsigned int g2 = cp[1];\n\t\t\tunsigned  int b2 = cp[2];\n\t\t\tdo {\n\t\t\t\tr1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1;\n\t\t\t\tg1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1;\n\t\t\t\tb1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1;\n\t\t\t\tcp += 3;\n\t\t\t} while ((cc -= 3) > 0);\n\t\t} else if (stride == 4) {\n\t\t\tunsigned int r1, g1, b1, a1;\n\t\t\tunsigned int r2 = cp[0];\n\t\t\tunsigned int g2 = cp[1];\n\t\t\tunsigned int b2 = cp[2];\n\t\t\tunsigned int a2 = cp[3];\n\t\t\tdo {\n\t\t\t\tr1 = cp[4]; cp[4] = (unsigned char)((r1-r2)&0xff); r2 = r1;\n\t\t\t\tg1 = cp[5]; cp[5] = (unsigned char)((g1-g2)&0xff); g2 = g1;\n\t\t\t\tb1 = cp[6]; cp[6] = (unsigned char)((b1-b2)&0xff); b2 = b1;\n\t\t\t\ta1 = cp[7]; cp[7] = (unsigned char)((a1-a2)&0xff); a2 = a1;\n\t\t\t\tcp += 4;\n\t\t\t} while ((cc -= 4) > 0);\n\t\t} else {\n\t\t\tcp += cc - 1;\n\t\t\tdo {\n\t\t\t\tREPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--)\n\t\t\t} while ((cc -= stride) > 0);\n\t\t}\n\t}\n}']