[tracker/wip/carlosg/coverity-fixes: 7/10] libtracker-data: Ensure an error is set
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/coverity-fixes: 7/10] libtracker-data: Ensure an error is set
- Date: Wed, 4 Mar 2020 22:21:34 +0000 (UTC)
commit 748acf48dd8a8cf4ed00ccf1c04093a7004db2ec
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Mar 4 20:21:43 2020 +0100
libtracker-data: Ensure an error is set
If we fail to parse the DBus URI for SERVICE{}, we would bail out
without an error, even though it's used for warnings. Ensure we
have an error for that case.
CID: #1491444
src/libtracker-data/tracker-vtab-service.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/libtracker-data/tracker-vtab-service.c b/src/libtracker-data/tracker-vtab-service.c
index b48efacdc..c0e4e894a 100644
--- a/src/libtracker-data/tracker-vtab-service.c
+++ b/src/libtracker-data/tracker-vtab-service.c
@@ -235,8 +235,14 @@ service_filter (sqlite3_vtab_cursor *vtab_cursor,
if (!tracker_util_parse_dbus_uri (cursor->service,
&bus_type,
- &bus_name, &object_path))
+ &bus_name, &object_path)) {
+ g_set_error (&error,
+ TRACKER_SPARQL_ERROR,
+ TRACKER_SPARQL_ERROR_UNSUPPORTED,
+ "Failed to parse uri '%s'",
+ cursor->service);
goto fail;
+ }
dbus_connection = g_bus_get_sync (bus_type, NULL, &error);
if (!dbus_connection)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]