[Xfce4-commits] <midori:master> Don't clear bindings of an erroneous sqlite statement

Christian Dywan noreply at xfce.org
Wed Jun 23 02:14:03 CEST 2010


Updating branch refs/heads/master
         to eec5359cf52c2df47b2564790ce22358363de6ff (commit)
       from 72756ed3f126dcd7fa26e6fdf1f86e9c79a40259 (commit)

commit eec5359cf52c2df47b2564790ce22358363de6ff
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Jun 22 23:15:25 2010 +0200

    Don't clear bindings of an erroneous sqlite statement
    
    This is not safe and can cause a crash.

 midori/midori-browser.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 5b26f46..75c5f31 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -3760,7 +3760,8 @@ _action_location_submit_uri (GtkAction*     action,
             g_printerr (_("Failed to insert new history item: %s\n"),
                         sqlite3_errmsg (db));
         sqlite3_reset (statement);
-        sqlite3_clear_bindings (statement);
+        if (sqlite3_step (statement) == SQLITE_DONE)
+            sqlite3_clear_bindings (statement);
         #endif
 
         g_free (keywords);



More information about the Xfce4-commits mailing list