emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9405cd8: Fix a segfault in the new svg code


From: Lars Ingebrigtsen
Subject: master 9405cd8: Fix a segfault in the new svg code
Date: Sat, 31 Oct 2020 19:11:25 -0400 (EDT)

branch: master
commit 9405cd84a6309f780e76c11a4c79709aa8a4f44f
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix a segfault in the new svg code
    
    * src/image.c (svg_load_image): Don't pass in a NULL for the
    logical rect, because that will sometimes segfault.
---
 src/image.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/image.c b/src/image.c
index 61c5aa7..c857b8e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9808,11 +9808,11 @@ svg_load_image (struct frame *f, struct image *img, 
char *contents,
 
   /* Get the image dimensions.  */
 #if LIBRSVG_CHECK_VERSION (2, 46, 0)
-  RsvgRectangle zero_rect, viewbox;
+  RsvgRectangle zero_rect, viewbox, out_logical_rect;
 
   rsvg_handle_get_geometry_for_layer (rsvg_handle, NULL,
                                       &zero_rect, &viewbox,
-                                      NULL, NULL);
+                                      &out_logical_rect, NULL);
   viewbox_width = viewbox.x + viewbox.width;
   viewbox_height = viewbox.y + viewbox.height;
 #else



reply via email to

[Prev in Thread] Current Thread [Next in Thread]