* image.c (svg_load): Omit needless test.
This commit is contained in:
parent
edaa182249
commit
cad02d3b80
2 changed files with 3 additions and 3 deletions
|
@ -18,8 +18,8 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -8073,7 +8073,7 @@ svg_load (struct frame *f, struct image *img)
|
|||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue