summaryrefslogtreecommitdiff
path: root/gtk/gtkicontheme.c
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2011-10-03 23:25:33 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2011-10-03 23:25:33 +0800
commiteb8c2dfae297f340279e2a1c848b14584f0c1dc7 (patch)
treeaa20ac644e03935e3afaa516aeca039a33fcb68f /gtk/gtkicontheme.c
parent25e65dc1b59527badfef052f988639c1ef22f22d (diff)
downloadgtk+-eb8c2dfae297f340279e2a1c848b14584f0c1dc7.tar.gz
Bug 660730: Use GStatBuf for portability
Thanks to Kean Johnston for pointing this out. There are a few places in GTK that use "struct stat", and then g_stat(), rather than using GStatBuf.This breaks things on Windows. Since the size of struct stat can vary depending on other flags specified, this has the potential to cause overwrites and is trivial to fix. Based on patch submitted by Kean Johnston
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r--gtk/gtkicontheme.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index cdebec327a..5d90596f23 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -979,7 +979,7 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name)
GKeyFile *theme_file;
GError *error = NULL;
IconThemeDirMtime *dir_mtime;
- struct stat stat_buf;
+ GStatBuf stat_buf;
priv = icon_theme->priv;
@@ -1123,7 +1123,7 @@ load_themes (GtkIconTheme *icon_theme)
IconSuffix old_suffix, new_suffix;
GTimeVal tv;
IconThemeDirMtime *dir_mtime;
- struct stat stat_buf;
+ GStatBuf stat_buf;
priv = icon_theme->priv;
@@ -1948,7 +1948,7 @@ rescan_themes (GtkIconTheme *icon_theme)
IconThemeDirMtime *dir_mtime;
GList *d;
int stat_res;
- struct stat stat_buf;
+ GStatBuf stat_buf;
GTimeVal tv;
priv = icon_theme->priv;