1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
diff -Naur imv-4.1.0/src/backend_libtiff.c imv-4.1.0.patched/src/backend_libtiff.c
--- imv-4.1.0/src/backend_libtiff.c 2019-12-21 17:54:26.000000000 -0500
+++ imv-4.1.0.patched/src/backend_libtiff.c 2020-11-21 16:40:37.971589947 -0500
@@ -110,6 +110,7 @@
{
struct private private;
+ TIFFSetErrorHandler(NULL);
private.tiff = TIFFOpen(path, "r");
if (!private.tiff) {
/* Header is read, so no BAD_PATH check here */
@@ -129,6 +130,7 @@
static enum backend_result open_memory(void *data, size_t len, struct imv_source **src)
{
struct private *private = malloc(sizeof *private);
+ TIFFSetErrorHandler(NULL);
private->data = data;
private->len = len;
private->pos = 0;
diff -Naur imv-4.1.0/src/main.c imv-4.1.0.patched/src/main.c
--- imv-4.1.0/src/main.c 2019-12-21 17:54:26.000000000 -0500
+++ imv-4.1.0.patched/src/main.c 2020-11-21 16:40:46.483589173 -0500
@@ -17,10 +17,6 @@
return 1;
}
-#ifdef IMV_BACKEND_LIBTIFF
- imv_install_backend(imv, &imv_backend_libtiff);
-#endif
-
#ifdef IMV_BACKEND_LIBPNG
imv_install_backend(imv, &imv_backend_libpng);
#endif
@@ -41,6 +37,10 @@
imv_install_backend(imv, &imv_backend_freeimage);
#endif
+#ifdef IMV_BACKEND_LIBTIFF
+ imv_install_backend(imv, &imv_backend_libtiff);
+#endif
+
if (!imv_load_config(imv)) {
imv_free(imv);
return 1;
|