diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2005-11-04 15:56:13 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2005-11-04 15:56:13 +0000 |
commit | 7f6251a59390ccb47d0be7852ac2cce083abc5b3 (patch) | |
tree | c1f3ce22bd7ae501423434db750e74220aff428e /gtk/xdgmime | |
parent | 796a2e3f4de402b6f5be90d8e4b75438175fc2e6 (diff) | |
download | gdk-pixbuf-7f6251a59390ccb47d0be7852ac2cce083abc5b3.tar.gz |
Prevent a segfault
Diffstat (limited to 'gtk/xdgmime')
-rw-r--r-- | gtk/xdgmime/ChangeLog | 5 | ||||
-rw-r--r-- | gtk/xdgmime/xdgmime.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gtk/xdgmime/ChangeLog b/gtk/xdgmime/ChangeLog index 5b18a59b9..72f58432d 100644 --- a/gtk/xdgmime/ChangeLog +++ b/gtk/xdgmime/ChangeLog @@ -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 diff --git a/gtk/xdgmime/xdgmime.c b/gtk/xdgmime/xdgmime.c index 897ef9b38..55d44b301 100644 --- a/gtk/xdgmime/xdgmime.c +++ b/gtk/xdgmime/xdgmime.c @@ -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 *); |