Subject: bug#21641: 25.0.50; Emacs crash on network connection?

From: Eli Zaretskii <[email-masked]>
Date: Wed, 07 Oct 2015 20:47:31 +0300

> Date: Wed, 07 Oct 2015 20:30:13 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> >         initial_buffer =           "Invalid image size (see
> >     ‘\000\000\000\000\000\365\350\037\001\000\000\000\000\002\000\000\000\016\000\000\000\245\330z\001", '\000' <repeats 12 times>
> 
> Ouch!  Does the below help?
> 
> diff --git a/src/image.c b/src/image.c
> index b586c53..6add400 100644
> --- a/src/image.c
> +++ b/src/image.c
> @@ -647,7 +647,8 @@ image_error (const char *format, ...)
>  static void
>  image_size_error (void)
>  {
> -  image_error ("Invalid image size (see `%s')", "max-image-size");
> +  image_error ("Invalid image size (see `%s')",
> +	       build_string ("max-image-size"));
>  }

Btw, after making this change, I see a lot of error messages from Glib
(called by librsvg), like this:

  (emacs.exe:1624): GLib-CRITICAL **: g_error_free: assertion 'error != NULL' failed

(And, of course, a lot of "Invalid image size" errors in *Messages*.)