Commit 7f6251a5 authored by Matthias Clasen's avatar Matthias Clasen

Prevent a segfault

parent 796a2e3f
2005-11-04 Matthias Clasen <mclasen@redhat.com>
* xdgmime.c (xdg_mime_list_mime_parents): Prevent
a segfault.
2005-10-18 Matthias Clasen <mclasen@redhat.com>
* xdgmimecache.c: Make magic comparisons work correctly
......
......@@ -719,6 +719,10 @@ xdg_mime_list_mime_parents (const char *mime)
return _xdg_mime_cache_list_mime_parents (mime);
parents = xdg_mime_get_mime_parents (mime);
if (!parents)
return NULL;
for (i = 0; parents[i]; i++) ;
n = (i + 1) * sizeof (char *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment