Skip to content

Commit 6e807b1

Browse files
authored
fix: improve libtiff checker (#2985)
Improve libtiff checker to avoid a false positive with upcoming emacs checker. While at it, add debian and OpenWRT test packages Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent bcafab0 commit 6e807b1

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

cve_bin_tool/checkers/libtiff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class LibtiffChecker(Checker):
1919
r'TIFF directory is missing required "StripByteCounts" field, calculating from imagelength',
2020
]
2121
FILENAME_PATTERNS = [r"libtiff.so."]
22-
VERSION_PATTERNS = [r"LIBTIFF, Version ([0-9]+\.[0-9]+\.[0-9]+)"]
22+
VERSION_PATTERNS = [r"LIBTIFF, Version ([0-9]+\.[0-9]+\.[0-9]+)\r?\nCopyright"]
2323
VENDOR_PRODUCT = [("libtiff", "libtiff")]
Binary file not shown.
Binary file not shown.

test/test_data/libtiff.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"version": "4.0.2",
88
"version_strings": [
99
'TIFF directory is missing required \\"StripByteCounts\\" field, calculating from imagelength',
10-
"LIBTIFF, Version 4.0.2",
10+
"LIBTIFF, Version 4.0.2\nCopyright",
1111
],
1212
}
1313
]
@@ -24,4 +24,16 @@
2424
"product": "libtiff",
2525
"version": "4.0.3",
2626
},
27+
{
28+
"url": "http://ftp.fr.debian.org/debian/pool/main/t/tiff/",
29+
"package_name": "libtiff5_4.2.0-1+deb11u4_amd64.deb",
30+
"product": "libtiff",
31+
"version": "4.2.0",
32+
},
33+
{
34+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
35+
"package_name": "libtiff_4.1.0-1_x86_64.ipk",
36+
"product": "libtiff",
37+
"version": "4.1.0",
38+
},
2739
]

0 commit comments

Comments
 (0)