Skip to content

Commit 65cf3a7

Browse files
fix: xml2 for android
Partial fix for #5405
1 parent 6f004a4 commit 65cf3a7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cve_bin_tool/checkers/xml2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Xml2Checker(Checker):
2323
]
2424
FILENAME_PATTERNS = [r"libxml2.so."]
2525
VERSION_PATTERNS: list[str] = [
26-
r"libxml2-([0-9]+\.[0-9]+\.[0-9]+)",
27-
r"libxml2.so.([0-9]+\.[0-9]+\.[0-9]+)",
26+
r"libxml2(?:-|\.so\.)([0-9]+\.[0-9]+\.[0-9]+)",
27+
r"([0-9]+\.[0-9]+\.[0-9]+)[a-z0-9>\-\r\n]*XML_ENTITY_REF_NODE",
2828
]
2929
VENDOR_PRODUCT = [("xmlsoft", "libxml2")]

test/test_data/xml2.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
"product": "libxml2",
77
"version": "2.9.0",
88
"version_strings": ["/libxml2-2.9.0/", "xmlNewElementContent : name != NULL !"],
9-
}
9+
},
10+
{
11+
"product": "libxml2",
12+
"version": "2.9.9",
13+
"version_strings": [
14+
"20909-GITv2.9.9-rc2-2-g7c4949afa\n-->\nXML_ENTITY_REF_NODE"
15+
],
16+
},
1017
]
1118
package_test_data = [
1219
{

0 commit comments

Comments
 (0)