[Tracker] [PATCH 1/1] tracker-parser: skip empty strings in parser_next



This fixes a crash in tracker-store.
---
 src/libtracker-fts/tracker-parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libtracker-fts/tracker-parser.c b/src/libtracker-fts/tracker-parser.c
index de059fa..c1161d1 100644
--- a/src/libtracker-fts/tracker-parser.c
+++ b/src/libtracker-fts/tracker-parser.c
@@ -299,7 +299,7 @@ parser_next (TrackerParser *parser,
        start = NULL;
        end = NULL;
 
-       for (p = parser->cursor; *p; p = g_utf8_next_char (p)) {
+       for (p = parser->cursor; *p && *p != '\0'; p = g_utf8_next_char (p)) {
                TrackerParserWordType type;
                gunichar              c;
 
-- 
1.6.3.3




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