summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Chee Yang <chee.yang.lee@intel.com>2020-04-02 19:48:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-02 21:44:04 +0100
commit0ec35b00d65c70485eb1efe602d9fca53e926811 (patch)
treefe6e4408ef653ae8e0247dd1f32d4d7ec8b88b23
parentabc741af16311cb473b7e3185ae34265b243d804 (diff)
downloadopenembedded-core-contrib-0ec35b00d65c70485eb1efe602d9fca53e926811.tar.gz
cve-update-db-native: fix DB file version for '-'
fix logic for CVE DB update so that when the CPE version is '-', it keeps the version as '-' in the DB file too and leave other operation as blank. Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/meta/cve-update-db-native.bb3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index 497d957d65..f27ade40db 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -138,6 +138,9 @@ def parse_node_and_insert(c, node, cveId):
if version != '*' and version != '-':
# Version is defined, this is a '=' match
yield [cveId, vendor, product, version, '=', '', '']
+ elif version == '-':
+ # no version information is available
+ yield [cveId, vendor, product, version, '', '', '']
else:
# Parse start version, end version and operators
op_start = ''