Prevent a segfault

This commit is contained in:
Matthias Clasen 2005-11-04 15:56:13 +00:00
parent 796a2e3f4d
commit 7f6251a593
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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 *);