Don't message complete GIF data upon errors
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 17 Jul 2020 14:01:55 +0000 (16:01 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 17 Jul 2020 14:01:55 +0000 (16:01 +0200)
* src/image.c (gif_load): When unable to parse a GIF specified
via a data attribute, don't message the complete binary, because
that's not useful (bug#40850).

src/image.c

index c8a192aaaf1d8a4c7e92617051672009681bdcd1..e7e0a93313ba928f24fc8d53dbfe8989b93c7dba 100644 (file)
@@ -8274,7 +8274,10 @@ gif_load (struct frame *f, struct image *img)
   rc = DGifSlurp (gif);
   if (rc == GIF_ERROR || gif->ImageCount <= 0)
     {
-      image_error ("Error reading `%s'", img->spec);
+      if (NILP (specified_data))
+       image_error ("Error reading `%s'", img->spec);
+      else
+       image_error ("Error reading GIF data");
       gif_close (gif, NULL);
       return 0;
     }