GNOME Bugzilla – Bug 741216
crash on NULL deref in metatree.c
Last modified: 2014-12-08 08:24:38 UTC
Created attachment 292251 [details] fixes crash
+ Trace 234406
(the line numbers are from 1.20 but the same bug is in 1.23). Patch that masks the crash attached, no idea if you should abort earlier. To reproduce the crash, chmod 000 ~/.local/share/gvfs-metadata and save a jpg from firefox, then wait a minute.
Thanks for the report. I'll try come up with a patch that errors out earlier soon.
I've already draft of patch to fix it, I think it needs more work. We have to be sure that metadata daemon does not crash if meta_tree_init fails... See the duplicated bug and also Bug 643268. *** This bug has been marked as a duplicate of bug 598561 ***
Created attachment 292286 [details] [review] metadata: Handle failure if files are not readable If the gvfs-metadata directory is not readable, handle the failure by returning NULL if meta_tree_open fails. Note that failing to open a tree for reading is not an error, but failing to open for writing is an error. Fix up several callers to handle a NULL tree without crashing.