From 8ee1252276d2901970707eaf42bc91630dd2e9b9 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 4 Mar 2008 11:29:43 +0100 Subject: [PATCH] Fix a deadlock if we pass an empty string to the journal insert. --- src/csync_journal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/csync_journal.c b/src/csync_journal.c index 53f8bac45..6da2c7f19 100644 --- a/src/csync_journal.c +++ b/src/csync_journal.c @@ -230,6 +230,10 @@ int csync_journal_insert(CSYNC *ctx, const char *statement) { sqlite3_stmt *stmt; const char *tail; + if (!statement[0]) { + return 0; + } + do { /* compile SQL program into a virtual machine, reattempteing if busy */ do {