* image.c: Integer and memory overflow fixes.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 00:23:08 +0000 (17:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 29 Jul 2011 00:23:08 +0000 (17:23 -0700)
commitddff315164d62859e0eb87e89de9f785b953a39a
tree173477b3b60a79ac3a9c619a11ed80a8b6cd1894
parent0eb0f3187d46ec0efdfc1df38565c160c759ecb2
* image.c: Integer and memory overflow fixes.

(RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these are duplicate
now that they've been promoted to lisp.h.
(x_allocate_bitmap_record, x_alloc_image_color)
(make_image_cache, cache_image, xpm_load):
Don't update size until alloc is done.
(xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
(x_detect_edges):
Check for size calculation overflow.
(ct_colors_allocated_max): New constant.
(x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
overflow.
src/ChangeLog
src/image.c