[tracker/wip/carlosg/backports-for-3-1: 13/16] libtracker-data: Fix parsing of first character in VARNAME terminal




commit d836bec05d988c975489913bd0a9a1342bce4381
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon May 10 11:58:35 2021 +0200

    libtracker-data: Fix parsing of first character in VARNAME terminal
    
    The first character may be an unicode character, it is not just in
    the ascii range. Ensure we read it as such to make the checks on
    greater values than 0xFF actually work.

 src/libtracker-data/tracker-sparql-grammar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-sparql-grammar.h b/src/libtracker-data/tracker-sparql-grammar.h
index b26a32ea3..8835539ad 100644
--- a/src/libtracker-data/tracker-sparql-grammar.h
+++ b/src/libtracker-data/tracker-sparql-grammar.h
@@ -1831,7 +1831,7 @@ terminal_VARNAME (const gchar  *str,
                  const gchar  *end,
                  const gchar **str_out)
 {
-       ACCEPT_CHAR(PN_CHARS_U || RANGE_NUMBER);
+       ACCEPT_UNICHAR (PN_CHARS_U || RANGE_NUMBER);
        OPTIONAL_UNICODE_STRING (PN_CHARS_U || RANGE_NUMBER ||
                                 ch == 0x00B7 || (ch >= 0x0300 && ch <= 0x036F) ||
                                 (ch >= 0x203F && ch <= 0x2040));


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