tracker r2126 - in branches/indexer-split: . src/libtracker-common
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2126 - in branches/indexer-split: . src/libtracker-common
- Date: Thu, 21 Aug 2008 08:59:28 +0000 (UTC)
Author: mr
Date: Thu Aug 21 08:59:27 2008
New Revision: 2126
URL: http://svn.gnome.org/viewvc/tracker?rev=2126&view=rev
Log:
* src/libtracker-common/tracker-ontology.c:
(ontology_hash_lookup_by_str), (ontology_hash_lookup_by_id): Check
the string is != NULL before using it in g_hash_table_lookup()
which uses strcmp for string comparisons.
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/src/libtracker-common/tracker-ontology.c
Modified: branches/indexer-split/src/libtracker-common/tracker-ontology.c
==============================================================================
--- branches/indexer-split/src/libtracker-common/tracker-ontology.c (original)
+++ branches/indexer-split/src/libtracker-common/tracker-ontology.c Thu Aug 21 08:59:27 2008
@@ -78,6 +78,10 @@
gchar *str_lower;
str_lower = g_utf8_collate_key (str, -1);
+ if (!str_lower) {
+ return NULL;
+ }
+
data = g_hash_table_lookup (hash_table, str_lower);
g_free (str_lower);
@@ -92,6 +96,10 @@
gchar *str;
str = g_strdup_printf ("%d", id);
+ if (!str) {
+ return NULL;
+ }
+
data = g_hash_table_lookup (hash_table, str);
g_free (str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]