[libsoup] hsts-db: further fix for format string of stored policies



commit 7fc86f208d59d8c5a3f75894448a9bc4ff827d4b
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Mon Jun 10 16:26:08 2019 +0300

    hsts-db: further fix for format string of stored policies
    
    The age and expiration date should be unsigned long, not just
    long.

 libsoup/soup-hsts-enforcer-db.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/soup-hsts-enforcer-db.c b/libsoup/soup-hsts-enforcer-db.c
index e097454d..8771707f 100644
--- a/libsoup/soup-hsts-enforcer-db.c
+++ b/libsoup/soup-hsts-enforcer-db.c
@@ -123,7 +123,7 @@ soup_hsts_enforcer_db_new (const char *filename)
 
 #define QUERY_ALL "SELECT id, host, max_age, expiry, include_subdomains FROM soup_hsts_policies;"
 #define CREATE_TABLE "CREATE TABLE soup_hsts_policies (id INTEGER PRIMARY KEY, host TEXT UNIQUE, max_age 
INTEGER, expiry INTEGER, include_subdomains INTEGER)"
-#define QUERY_INSERT "INSERT OR REPLACE INTO soup_hsts_policies VALUES((SELECT id FROM soup_hsts_policies 
WHERE host=%Q), %Q, %u, %u, %u);"
+#define QUERY_INSERT "INSERT OR REPLACE INTO soup_hsts_policies VALUES((SELECT id FROM soup_hsts_policies 
WHERE host=%Q), %Q, %lu, %lu, %u);"
 #define QUERY_DELETE "DELETE FROM soup_hsts_policies WHERE host=%Q;"
 
 enum {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]