--- old/src/java.desktop/share/native/libjavajpeg/jdphuff.c 2016-06-25 00:08:19.578491464 +0900 +++ new/src/java.desktop/share/native/libjavajpeg/jdphuff.c 2016-06-25 00:08:19.232492777 +0900 @@ -215,10 +215,10 @@ 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ - { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, - ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, - ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, - ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + { 0, (0xffffffff<<1) + 1, (0xffffffff<<2) + 1, (0xffffffff<<3) + 1, (0xffffffff<<4) + 1, + (0xffffffff<<5) + 1, (0xffffffff<<6) + 1, (0xffffffff<<7) + 1, (0xffffffff<<8) + 1, + (0xffffffff<<9) + 1, (0xffffffff<<10) + 1, (0xffffffff<<11) + 1, (0xffffffff<<12) + 1, + (0xffffffff<<13) + 1, (0xffffffff<<14) + 1, (0xffffffff<<15) + 1 }; #endif /* AVOID_TABLES */ @@ -496,8 +496,8 @@ { phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; int Se = cinfo->Se; - int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ - int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int m1 = 0xffffffff << cinfo->Al; /* -1 in the bit position being coded */ register int s, k, r; unsigned int EOBRUN; JBLOCKROW block;