]> code.ossystems Code Review - openembedded-core.git/commitdiff
cve-update-db-native: use SQL placeholders instead of format strings
authorRoss Burton <ross.burton@intel.com>
Wed, 6 Nov 2019 15:37:34 +0000 (17:37 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Nov 2019 20:44:15 +0000 (20:44 +0000)
(From OE-Core rev: 91770338f76ef35f3c4eeac216eb9d2b3188e575)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/meta/cve-update-db-native.bb

index ae8f1a958bdbc43543ed1d0b353ff0dc16a38463..d60159bc2adf7d99d09260cc77707e0bac6d1c7c 100644 (file)
@@ -57,7 +57,7 @@ python do_populate_cve_db() {
             break
 
         # Compare with current db last modified date
-        c.execute("select DATE from META where YEAR = '%d'" % year)
+        c.execute("select DATE from META where YEAR = ?", (year,))
         meta = c.fetchone()
         if not meta or meta[0] != last_modified:
             # Update db with current year json file