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



Pushed to master,

Thanks!

On Mon, 2009-11-23 at 13:41 +0100, Juan A. Suarez Romero wrote:
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;
 


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be




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