Skip to content

Commit 56010c4

Browse files
authored
feat(checker): Detect jasper 2.x, as found in msys/cygwin (#4734)
1 parent 0baeb7b commit 56010c4

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

cve_bin_tool/checkers/jasper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ class JasperChecker(Checker):
1919
VERSION_PATTERNS = [
2020
r"([0-9]+\.[0-9]+\.[0-9]+)[a-z%: \[\]\-\r\n]*libjasper",
2121
r"([0-9]+\.[0-9]+\.[0-9]+)\r?\nJasPer",
22+
r"/jasper-(?:version-)?([0-9]+\.[0-9]+\.[0-9]+)/",
2223
]
2324
VENDOR_PRODUCT = [("jasper_project", "jasper")]
Binary file not shown.

test/test_data/jasper.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
mapping_test_data = [
55
{"product": "jasper", "version": "3.0.6", "version_strings": ["3.0.6\nlibjasper"]},
66
{"product": "jasper", "version": "4.2.3", "version_strings": ["4.2.3\nJasPer"]},
7+
{
8+
"product": "jasper",
9+
"version": "2.0.14",
10+
"version_strings": [
11+
"C:/repo/mingw-w64-jasper/src/jasper-version-2.0.14/src/libjasper/base/jas_cm.c",
12+
"/usr/src/ports/jasper/jasper-2.0.14-1.x86_64/src/jasper-2.0.14/src/libjasper/base/jas_cm.c",
13+
],
14+
},
715
]
816
package_test_data = [
917
{
@@ -19,4 +27,11 @@
1927
"version": "4.2.4",
2028
"other_products": ["gcc"],
2129
},
30+
{
31+
"url": "https://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/jasper/libjasper4/",
32+
"package_name": "libjasper4-2.0.14-1.tar.xz",
33+
"product": "jasper",
34+
"version": "2.0.14",
35+
"other_products": ["gcc"],
36+
},
2237
]

0 commit comments

Comments
 (0)