mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-01 06:21:56 -09:00
support/scripts/cve.py: use proper CPE ID version when available
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
@@ -229,6 +229,11 @@ class CVE:
|
|||||||
# if we don't have a cpeid, build one based on name and version
|
# if we don't have a cpeid, build one based on name and version
|
||||||
if not cpeid:
|
if not cpeid:
|
||||||
cpeid = "cpe:2.3:*:*:%s:%s:*:*:*:*:*:*:*" % (name, version)
|
cpeid = "cpe:2.3:*:*:%s:%s:*:*:*:*:*:*:*" % (name, version)
|
||||||
|
# if we have a cpeid, use its version instead of the package
|
||||||
|
# version, as they might be different due to
|
||||||
|
# <pkg>_CPE_ID_VERSION
|
||||||
|
else:
|
||||||
|
pkg_version = distutils.version.LooseVersion(cpe_version(cpeid))
|
||||||
|
|
||||||
for cpe in self.each_cpe():
|
for cpe in self.each_cpe():
|
||||||
if not cpe_matches(cpe['id'], cpeid):
|
if not cpe_matches(cpe['id'], cpeid):
|
||||||
|
|||||||
Reference in New Issue
Block a user