From b15a223a8ab3b411b49a854470d0df003acba8b2 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 10 Jun 2008 10:51:29 +0000 Subject: [PATCH] fix SEGV by not using uninitialized memory as array index. 2008-06-10 Michael Natterer * gcontenttype.c (g_content_type_get_icon): fix SEGV by not using uninitialized memory as array index. svn path=/trunk/; revision=6981 --- gio/ChangeLog | 5 +++++ gio/gcontenttype.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gio/ChangeLog b/gio/ChangeLog index 576533a..a5e3f66 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,8 @@ +2008-06-10 Michael Natterer + + * gcontenttype.c (g_content_type_get_icon): fix SEGV by not using + uninitialized memory as array index. + 2008-06-10 Tor Lillqvist * gcontenttype.c (g_content_type_can_be_executable) diff --git a/gio/gcontenttype.c b/gio/gcontenttype.c index 1ac22cb..617c523 100644 --- a/gio/gcontenttype.c +++ b/gio/gcontenttype.c @@ -676,7 +676,7 @@ g_content_type_get_icon (const char *type) char *mimetype_icon, *generic_mimetype_icon, *q; char *xdg_mimetype_icon, *legacy_mimetype_icon; char *icon_names[4]; - int n; + int n = 0; const char *p; GIcon *themed_icon; -- 2.7.4