[Tracker] PATCH: Fix segfault in tracker-ontologies (shows in tracker-miner-fs) when ontologies are missing



Hi list,

When moving the ontology directory around (I recently submitted a
patch for this functionality), I noticed that tracker-miner-fs
segfaults when the ontologies are not found. I think there should be a
check for ontology presence, and also ontology validity, but have not
yet implemented this.

I have however added some checks for the return value of the
gvdb_table_list () function, which seems to return NULL when the gvdb
files are bad. These files go bad when no ontologies are loaded.

To reproduce the segfaults, move the $PREFIX/share/tracker/ontologies
directory temporarily, so that it cannot be found. Or apply the
previous patch which allows configuring the ontology directory path,
and mess the path up from DConf ;)

The following patch guards for NULLs when reading gvdb files during
the loading of namespaces, classes and properties. Warning messages
are printed when either of the aforementioned values are missing.

Here's the patch:
https://github.com/Pelagicore/tracker-ivi/commit/d643bbfe0442d43c83124aebc0c55470f5675117

-- 
Regards,
Jonatan Pålsson

Pelagicore AB
Ekelundsgatan 4, 6th floor, SE-411 18 Gothenburg, Sweden


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