fix SEGV by not using uninitialized memory as array index.

2008-06-10  Michael Natterer  <mitch@imendio.com>

	* gcontenttype.c (g_content_type_get_icon): fix SEGV by not using
	uninitialized memory as array index.


svn path=/trunk/; revision=6981
This commit is contained in:
Michael Natterer 2008-06-10 10:51:29 +00:00 committed by Michael Natterer
parent 8b5ad297da
commit b15a223a8a
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-06-10 Michael Natterer <mitch@imendio.com>
* gcontenttype.c (g_content_type_get_icon): fix SEGV by not using
uninitialized memory as array index.
2008-06-10 Tor Lillqvist <tml@novell.com>
* gcontenttype.c (g_content_type_can_be_executable)

View File

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