]> git.eshelyaron.com Git - emacs.git/commit
Avoid double svg error reporting and segfaults
authordickmao <dick.r.chiang@gmail.com>
Tue, 13 Sep 2022 11:57:44 +0000 (13:57 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 13 Sep 2022 11:57:44 +0000 (13:57 +0200)
commitdd22694421249ef071488c02192b724da1aa03cb
tree5bd939a106050c5671a1199fc7d41c22874e4810
parent89199f16aef2b1a2e79f22dddd7322f9f4fdd1fc
Avoid double svg error reporting and segfaults

* src/image.c (svg_load_image): Use g_error_free directly instead
of the helder g_clear_error (since we're only calling it with
non-nil values).
(svg_load_image): Avoid segfault and double reporting errors.
* test/manual/image-tests.el (image-tests-load-image/svg-too-big)
(image-tests-load-image/svg-invalid): Test it (bug#57755).
src/image.c
test/manual/image-tests.el