tracker r2491 - in trunk: . src/libtracker-data src/trackerd
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2491 - in trunk: . src/libtracker-data src/trackerd
- Date: Thu, 13 Nov 2008 12:17:27 +0000 (UTC)
Author: mr
Date: Thu Nov 13 12:17:27 2008
New Revision: 2491
URL: http://svn.gnome.org/viewvc/tracker?rev=2491&view=rev
Log:
* src/libtracker-data/tracker-data-search.c:
* src/trackerd/tracker-keywords.c: Don't crash when we pass an
empty GStrv to tracker_keywords_search().
Modified:
trunk/ChangeLog
trunk/src/libtracker-data/tracker-data-search.c
trunk/src/trackerd/tracker-keywords.c
Modified: trunk/src/libtracker-data/tracker-data-search.c
==============================================================================
--- trunk/src/libtracker-data/tracker-data-search.c (original)
+++ trunk/src/libtracker-data/tracker-data-search.c Thu Nov 13 12:17:27 2008
@@ -1502,6 +1502,7 @@
g_return_val_if_fail (service_type != NULL, NULL);
g_return_val_if_fail (keywords != NULL, NULL);
+ g_return_val_if_fail (keywords[0] != NULL, NULL);
if (!tracker_ontology_service_is_valid (service_type)) {
g_set_error (error, TRACKER_DBUS_ERROR, 0,
@@ -1517,9 +1518,7 @@
/* Create keyword search string */
search = g_string_new ("");
- g_string_append_printf (search,
- "'%s'",
- keywords[0]);
+ g_string_append_printf (search, "'%s'", keywords[0]);
for (p = keywords + 1; *p; p++) {
g_string_append_printf (search, ", '%s'", *p);
Modified: trunk/src/trackerd/tracker-keywords.c
==============================================================================
--- trunk/src/trackerd/tracker-keywords.c (original)
+++ trunk/src/trackerd/tracker-keywords.c Thu Nov 13 12:17:27 2008
@@ -509,6 +509,7 @@
tracker_dbus_async_return_if_fail (service_type != NULL, context);
tracker_dbus_async_return_if_fail (keywords != NULL, context);
+ tracker_dbus_async_return_if_fail (keywords[0] != NULL, context);
tracker_dbus_request_new (request_id,
"DBus request to search keywords, "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]