Skip to content

Commit

Permalink
feat(checker): Detect jasper 2.x, as found in msys/cygwin (#4734)
Browse files Browse the repository at this point in the history
  • Loading branch information
qmfrederik authored Feb 6, 2025
1 parent 0baeb7b commit 56010c4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions cve_bin_tool/checkers/jasper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ class JasperChecker(Checker):
VERSION_PATTERNS = [
r"([0-9]+\.[0-9]+\.[0-9]+)[a-z%: \[\]\-\r\n]*libjasper",
r"([0-9]+\.[0-9]+\.[0-9]+)\r?\nJasPer",
r"/jasper-(?:version-)?([0-9]+\.[0-9]+\.[0-9]+)/",
]
VENDOR_PRODUCT = [("jasper_project", "jasper")]
Binary file not shown.
15 changes: 15 additions & 0 deletions test/test_data/jasper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
mapping_test_data = [
{"product": "jasper", "version": "3.0.6", "version_strings": ["3.0.6\nlibjasper"]},
{"product": "jasper", "version": "4.2.3", "version_strings": ["4.2.3\nJasPer"]},
{
"product": "jasper",
"version": "2.0.14",
"version_strings": [
"C:/repo/mingw-w64-jasper/src/jasper-version-2.0.14/src/libjasper/base/jas_cm.c",
"/usr/src/ports/jasper/jasper-2.0.14-1.x86_64/src/jasper-2.0.14/src/libjasper/base/jas_cm.c",
],
},
]
package_test_data = [
{
Expand All @@ -19,4 +27,11 @@
"version": "4.2.4",
"other_products": ["gcc"],
},
{
"url": "https://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin/x86_64/release/jasper/libjasper4/",
"package_name": "libjasper4-2.0.14-1.tar.xz",
"product": "jasper",
"version": "2.0.14",
"other_products": ["gcc"],
},
]

0 comments on commit 56010c4

Please sign in to comment.