[tracker/parser-unicode-libs-review: 69/85] Fix invalid read when end of loop arrives



commit c366c19a1411f96d8cd24eb076943d60f1b73f60
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Wed Apr 28 21:28:43 2010 +0200

    Fix invalid read when end of loop arrives

 src/libtracker-fts/tracker-parser.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-parser.c b/src/libtracker-fts/tracker-parser.c
index 13ffe27..1e2b8b7 100644
--- a/src/libtracker-fts/tracker-parser.c
+++ b/src/libtracker-fts/tracker-parser.c
@@ -650,8 +650,8 @@ parser_next (TrackerParser *parser,
 
 		/* Find next word break */
 		i = parser->cursor + first_unichar_len;
-		while (!parser->word_break_flags [i] &&
-		       i < parser->txt_size) {
+		while (i < parser->txt_size &&
+		       !parser->word_break_flags [i]) {
 			i++;
 		}
 



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