diff options
author | Gabriel Ivascu <ivascu.gabriel59@gmail.com> | 2017-11-19 20:28:01 +0200 |
---|---|---|
committer | Gabriel Ivascu <ivascu.gabriel59@gmail.com> | 2017-11-19 20:28:01 +0200 |
commit | df1c957dcf10c8a70aefa32c738b960b5386eaa2 (patch) | |
tree | abce32e7b9d4f009537776ae9f965de5df393e9a | |
parent | 0bb8585d5213c5868dfc5ef3e8d83514a97a1c25 (diff) | |
download | epiphany-df1c957dcf10c8a70aefa32c738b960b5386eaa2.tar.gz |
gsb-storage: Fix bad bind indices
-rw-r--r-- | lib/safe-browsing/ephy-gsb-storage.c | 8 |
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; } |