[tracker/wip/carlosg/more-tests] libtracker-fts: Double check fts offsets array size



commit 63971657e50c5968b3e32066af813086ddf9eba8
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Mar 10 21:37:02 2022 +0100

    libtracker-fts: Double check fts offsets array size

 src/libtracker-fts/tracker-fts-tokenizer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-fts/tracker-fts-tokenizer.c b/src/libtracker-fts/tracker-fts-tokenizer.c
index 707e81a81..dd100fd02 100644
--- a/src/libtracker-fts/tracker-fts-tokenizer.c
+++ b/src/libtracker-fts/tracker-fts-tokenizer.c
@@ -245,7 +245,7 @@ tracker_offsets_function (const Fts5ExtensionApi  *api,
 
                first = FALSE;
 
-               if (offsets->len != 0) {
+               if (offsets->len >= n_token) {
                        if (str->len != 0)
                                g_string_append_c (str, ',');
 


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