]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-update-db-native: fix DB file version for '-'
authorLee Chee Yang <chee.yang.lee@intel.com>
Thu, 2 Apr 2020 11:48:55 +0000 (19:48 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Apr 2020 20:44:04 +0000 (21:44 +0100)
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>
meta/recipes-core/meta/cve-update-db-native.bb

index 497d957d6533d05a9ceed0a0ac497fad60c673c0..f27ade40dbb846bf2149d01ffe633888a1be6643 100644 (file)
@@ -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 = ''