[tracker/tracker-1.4] libtracker-data: Silence a CRITICAL
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.4] libtracker-data: Silence a CRITICAL
- Date: Thu, 10 Dec 2015 12:16:12 +0000 (UTC)
commit 426a9581ee928ca89616ec7970c5e8fb72b5c456
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Dec 10 01:16:23 2015 +0100
libtracker-data: Silence a CRITICAL
We shouldn't be passing a NULL string argument to g_regex_match.
https://bugzilla.gnome.org/show_bug.cgi?id=759280
src/libtracker-data/tracker-db-interface-sqlite.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index 85dba3a..bdc0f74 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -560,7 +560,11 @@ function_sparql_regex (sqlite3_context *context,
sqlite3_set_auxdata (context, 1, regex, (void (*) (void*)) g_regex_unref);
}
- ret = g_regex_match (regex, text, 0, NULL);
+ if (text != NULL) {
+ ret = g_regex_match (regex, text, 0, NULL);
+ } else {
+ ret = FALSE;
+ }
sqlite3_result_int (context, ret);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]