[tracker] libtracker-fts: initialize all buffers before using them



commit 3cb8ee57ad10894c0eb26df93203d8e6b2268896
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Thu Jul 8 09:38:48 2010 +0200

    libtracker-fts: initialize all buffers before using them

 src/libtracker-fts/tracker-fts.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 3df2437..a186280 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -4624,6 +4624,12 @@ static int fulltextQuery(
     return SQLITE_OK;
   }
 
+  /* Initialize empty buffers */
+  dataBufferInit (&left, 0);
+  dataBufferInit (&right, 0);
+  dataBufferInit (&or, 0);
+  dataBufferInit (&new, 0);
+
   /* Merge AND terms. */
   /* TODO(shess) I think we can early-exit if( i>nNot && left.nData==0 ). */
   aTerm = pQuery->pTerms;



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