From: Paul Eggert Date: Sat, 4 Jun 2011 03:24:42 +0000 (-0700) Subject: * image.c (svg_load): Omit needless test. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~8^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cad02d3b8074b286b5c2796294c477cd2056bcc1;p=emacs.git * image.c (svg_load): Omit needless test. --- diff --git a/src/ChangeLog b/src/ChangeLog index 374790b51f6..ead20c31f7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/image.c b/src/image.c index ffc4f633c7a..a179568cb85 100644 --- a/src/image.c +++ b/src/image.c @@ -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;