]> 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, 17 Jul 2019 10:45:38 +0000 (11:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Jul 2019 11:15:51 +0000 (12:15 +0100)
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 e16c41a72fdaae0201a580afa0c85c8353d83d28..72d1f48835bc3a4d46cdc62a74300a4c05ee8452 100644 (file)
@@ -62,7 +62,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