diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/cve-check.bbclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass index e95716d9de..19ed5548b3 100644 --- a/meta/classes/cve-check.bbclass +++ b/meta/classes/cve-check.bbclass | |||
@@ -267,17 +267,17 @@ def get_cve_info(d, cves): | |||
267 | 267 | ||
268 | cve_data = {} | 268 | cve_data = {} |
269 | conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE")) | 269 | conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE")) |
270 | placeholders = ",".join("?" * len(cves)) | ||
271 | query = "SELECT * FROM NVD WHERE id IN (%s)" % placeholders | ||
272 | for row in conn.execute(query, tuple(cves)): | ||
273 | cve_data[row[0]] = {} | ||
274 | cve_data[row[0]]["summary"] = row[1] | ||
275 | cve_data[row[0]]["scorev2"] = row[2] | ||
276 | cve_data[row[0]]["scorev3"] = row[3] | ||
277 | cve_data[row[0]]["modified"] = row[4] | ||
278 | cve_data[row[0]]["vector"] = row[5] | ||
279 | conn.close() | ||
280 | 270 | ||
271 | for cve in cves: | ||
272 | for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)): | ||
273 | cve_data[row[0]] = {} | ||
274 | cve_data[row[0]]["summary"] = row[1] | ||
275 | cve_data[row[0]]["scorev2"] = row[2] | ||
276 | cve_data[row[0]]["scorev3"] = row[3] | ||
277 | cve_data[row[0]]["modified"] = row[4] | ||
278 | cve_data[row[0]]["vector"] = row[5] | ||
279 | |||
280 | conn.close() | ||
281 | return cve_data | 281 | return cve_data |
282 | 282 | ||
283 | def cve_write_data(d, patched, unpatched, cve_data): | 283 | def cve_write_data(d, patched, unpatched, cve_data): |