summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Ivascu <ivascu.gabriel59@gmail.com>2017-11-19 20:28:01 +0200
committerGabriel Ivascu <ivascu.gabriel59@gmail.com>2017-11-19 20:28:01 +0200
commitdf1c957dcf10c8a70aefa32c738b960b5386eaa2 (patch)
treeabce32e7b9d4f009537776ae9f965de5df393e9a
parent0bb8585d5213c5868dfc5ef3e8d83514a97a1c25 (diff)
downloadepiphany-df1c957dcf10c8a70aefa32c738b960b5386eaa2.tar.gz
gsb-storage: Fix bad bind indices
-rw-r--r--lib/safe-browsing/ephy-gsb-storage.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/safe-browsing/ephy-gsb-storage.c b/lib/safe-browsing/ephy-gsb-storage.c
index aec72dbb6..374d98dd4 100644
--- a/lib/safe-browsing/ephy-gsb-storage.c
+++ b/lib/safe-browsing/ephy-gsb-storage.c
@@ -783,6 +783,7 @@ ephy_gsb_storage_update_client_state (EphyGSBStorage *self,
EphySQLiteStatement *statement;
GError *error = NULL;
const char *sql;
+ gboolean success;
g_assert (EPHY_IS_GSB_STORAGE (self));
g_assert (self->is_operable);
@@ -803,7 +804,12 @@ ephy_gsb_storage_update_client_state (EphyGSBStorage *self,
return;
}
- if (!bind_threat_list_params (statement, list, 1, 2, 3, clear ? -1 : 0)) {
+ if (clear)
+ success = bind_threat_list_params (statement, list, 0, 1, 2, -1);
+ else
+ success = bind_threat_list_params (statement, list, 1, 2, 3, 0);
+
+ if (!success) {
g_object_unref (statement);
return;
}