diff mbox series

[RFC,CFH,sumo,19/47] cve-update-db-native: use SQL placeholders instead of format strings

Message ID 9b102be1ec621975328f6651220be0d4b475b570.1573047194.git.mikko.rapeli@bmw.de
State New
Headers show
Series None | expand

Commit Message

Mikko Rapeli Nov. 6, 2019, 3:37 p.m. UTC
From: Ross Burton <ross.burton@intel.com>


(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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
1.9.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/meta/cve-update-db-native.bb b/meta/recipes-core/meta/cve-update-db-native.bb
index ae8f1a9..d60159b 100644
--- a/meta/recipes-core/meta/cve-update-db-native.bb
+++ b/meta/recipes-core/meta/cve-update-db-native.bb
@@ -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