From 8d5885bfdf5d3501c87745a1bacfe786336c304d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Tue, 13 Jun 2023 13:35:53 +0200 Subject: Prevent a possibility of GdkPixbuf crashes --- fiv-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fiv-io.c b/fiv-io.c index 2d5229d..b09cd57 100644 --- a/fiv-io.c +++ b/fiv-io.c @@ -3323,6 +3323,8 @@ fiv_io_open_from_data( GError *err = NULL; if ((surface = open_gdkpixbuf(data, len, ctx, &err))) { g_clear_error(error); + } else if (!err) { + // Contrary to documentation, this is a possible outcome (libheif). } else if (err->code == GDK_PIXBUF_ERROR_UNKNOWN_TYPE) { g_error_free(err); } else { -- cgit v1.2.3-70-g09d2