Skip to content

Commit 5c2ce74

Browse files
authored
fix: improve pango checker (#2986)
Improve pango checker to avoid false positives with upcoming emacs checker Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 6e807b1 commit 5c2ce74

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

cve_bin_tool/checkers/pango.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@
1616
class PangoChecker(Checker):
1717
CONTAINS_PATTERNS: list[str] = []
1818
FILENAME_PATTERNS: list[str] = []
19-
VERSION_PATTERNS = [r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n[pP]ango"]
19+
VERSION_PATTERNS = [
20+
r"([0-9]+\.[0-9]+\.[0-9]+)\r?\n/etc/pango",
21+
r"([0-9]+\.[0-9]+\.[0-9]+)\r?\nPango version",
22+
]
2023
VENDOR_PRODUCT = [("gnome", "pango"), ("pango", "pango")]

test/test_data/pango.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
# SPDX-License-Identifier: GPL-3.0-or-later
33

44
mapping_test_data = [
5+
{
6+
"product": "pango",
7+
"version": "1.40.5",
8+
"version_strings": ["1.40.5\n/etc/pango"],
9+
},
510
{
611
"product": "pango",
712
"version": "1.40.5",
813
"version_strings": ["1.40.5\nPango version"],
9-
}
14+
},
1015
]
1116
package_test_data = [
1217
{

0 commit comments

Comments
 (0)