diff options
author | marcus <marcus@FreeBSD.org> | 2007-02-22 12:50:53 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2007-02-22 12:50:53 +0800 |
commit | 016a4d4ee27bacf87124790f4d77fe2fa7f547fe (patch) | |
tree | 82c5804f170e2409a66c27c6d015df1aa926c5de /x11-toolkits/gtk30 | |
parent | 6b58779bcd3fb7ab217a2a113adcb7e23f6e2c76 (diff) | |
download | freebsd-ports-gnome-016a4d4ee27bacf87124790f4d77fe2fa7f547fe.tar.gz freebsd-ports-gnome-016a4d4ee27bacf87124790f4d77fe2fa7f547fe.tar.zst freebsd-ports-gnome-016a4d4ee27bacf87124790f4d77fe2fa7f547fe.zip |
Fix a bug where a NULL path could be dereferenced in a GtkFileChooserButton
which would lead to critical errors under GNOME 2.16, and a crash under
GNOME 2.17. See http://bugzilla.gnome.org/show_bug.cgi?id=410565 for
more details.
Obtained from: http://bugzilla.gnome.org/show_bug.cgi?id=410565 (see
http://bugzilla.gnome.org/attachment.cgi?id=83080&action=view)
Diffstat (limited to 'x11-toolkits/gtk30')
-rw-r--r-- | x11-toolkits/gtk30/Makefile | 2 | ||||
-rw-r--r-- | x11-toolkits/gtk30/files/patch-gtk_gtkfilechooserbutton.c | 66 |
2 files changed, 67 insertions, 1 deletions
diff --git a/x11-toolkits/gtk30/Makefile b/x11-toolkits/gtk30/Makefile index 5784f77a908a..85f8169a52ee 100644 --- a/x11-toolkits/gtk30/Makefile +++ b/x11-toolkits/gtk30/Makefile @@ -8,7 +8,7 @@ PORTNAME= gtk PORTVERSION= 2.10.9 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/gtk+/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/,} \ ftp://ftp.gtk.org/pub/gtk/v2.10/ \ diff --git a/x11-toolkits/gtk30/files/patch-gtk_gtkfilechooserbutton.c b/x11-toolkits/gtk30/files/patch-gtk_gtkfilechooserbutton.c new file mode 100644 index 000000000000..1fa8a1d47438 --- /dev/null +++ b/x11-toolkits/gtk30/files/patch-gtk_gtkfilechooserbutton.c @@ -0,0 +1,66 @@ +Index: gtk/gtkfilechooserbutton.c +=================================================================== +--- gtk/gtkfilechooserbutton.c (revision 17341) ++++ gtk/gtkfilechooserbutton.c (working copy) +@@ -1193,8 +1193,8 @@ + gpointer user_data) + { + gboolean cancelled = handle->cancelled; +- GdkPixbuf *pixbuf; + struct ChangeIconThemeData *data = user_data; ++ GtkTreePath *path; + + if (!g_slist_find (data->button->priv->change_icon_theme_handles, handle)) + goto out; +@@ -1205,29 +1205,33 @@ + if (cancelled || error) + goto out; + +- pixbuf = gtk_file_info_render_icon (info, GTK_WIDGET (data->button), +- data->button->priv->icon_size, NULL); +- +- if (pixbuf) ++ path = gtk_tree_row_reference_get_path (data->row_ref); ++ if (path) + { +- gint width = 0; +- GtkTreeIter iter; +- GtkTreePath *path; ++ GdkPixbuf *pixbuf; + +- width = MAX (width, gdk_pixbuf_get_width (pixbuf)); ++ pixbuf = gtk_file_info_render_icon (info, GTK_WIDGET (data->button), ++ data->button->priv->icon_size, NULL); ++ if (pixbuf) ++ { ++ gint width = 0; ++ GtkTreeIter iter; + +- path = gtk_tree_row_reference_get_path (data->row_ref); +- gtk_tree_model_get_iter (data->button->priv->model, &iter, path); +- gtk_tree_path_free (path); ++ width = MAX (width, gdk_pixbuf_get_width (pixbuf)); + +- gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter, +- ICON_COLUMN, pixbuf, +- -1); +- g_object_unref (pixbuf); ++ gtk_tree_model_get_iter (data->button->priv->model, &iter, path); + +- g_object_set (data->button->priv->icon_cell, +- "width", width, +- NULL); ++ gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter, ++ ICON_COLUMN, pixbuf, ++ -1); ++ g_object_unref (pixbuf); ++ ++ g_object_set (data->button->priv->icon_cell, ++ "width", width, ++ NULL); ++ } ++ ++ gtk_tree_path_free (path); + } + + out: |