Avoid undefined behavior in color table hashing.
commit911ad4a15e284dec36f435f031a09cebc08b094d
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Nov 2014 06:34:52 +0000 (12 22:34 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Nov 2014 06:35:22 +0000 (12 22:35 -0800)
treea9e517de7b2d05c3fd485616a5f829c967bfff9d
parent5531e676d43d4df0a6320ba2b03175d4a0aad86d
Avoid undefined behavior in color table hashing.

* image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
(ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function.  All uses changed.
This function avoids undefined behavior with signed shift overflow.
src/ChangeLog
src/image.c