From 0318424540d3cfd2fce15c6999066beb4d80c44d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 13 Jun 2023 13:46:55 +0200 Subject: [PATCH] Handle LibTIFF errors correctly --- fiv-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fiv-io.c b/fiv-io.c index b09cd57..c434773 100644 --- a/fiv-io.c +++ b/fiv-io.c @@ -3039,7 +3039,8 @@ open_libtiff( // We inform about unsupported directories, but do not fail on them. GError *err = NULL; if (!try_append_page( - load_libtiff_directory(tiff, &err), &result, &result_tail)) { + load_libtiff_directory(tiff, &err), &result, &result_tail) && + err) { add_warning(ctx, "%s", err->message); g_error_free(err); }