Use ptrdiff_t, not int, for sizes.
* image.c (slurp_file): Switch from int to ptrdiff_t.
All uses changed.
- (slurp_file, svg_load): Check that file size fits in both
- size_t (for malloc) and ptrdiff_t (for sanity and safety).
+ (slurp_file): Check that file size fits in both size_t (for
+ malloc) and ptrdiff_t (for sanity and safety).
2011-06-03 Paul Eggert <eggert@cs.ucla.edu>
Lisp_Object data;
data = image_spec_value (img->spec, QCdata, NULL);
- if (! (STRINGP (data) && SBYTES (data) <= min (PTRDIFF_MAX, SIZE_MAX)))
+ if (!STRINGP (data))
{
image_error ("Invalid image data `%s'", data, Qnil);
return 0;