[gtk+] Bug 508601 - Copying from GTK+ applications causes crash
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Bug 508601 - Copying from GTK+ applications causes crash
- Date: Mon, 25 Jul 2011 20:06:25 +0000 (UTC)
commit 8d69f3daf258c03e3b8d839cacc15a7b4d12e64d
Author: Kristian Rietveld <kris gtk org>
Date: Mon Jul 25 22:02:25 2011 +0200
Bug 508601 - Copying from GTK+ applications causes crash
In GtkClipboardOwner pasteboard:provideDataForType do not call
_gtk_quartz_set_selection_data_for_pasteboard() is selection_data.length
is smaller than 0. The function relies on having a positive length,
since it stores the length in a uint ...
gtk/gtkclipboard-quartz.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkclipboard-quartz.c b/gtk/gtkclipboard-quartz.c
index a77d443..ee7766e 100644
--- a/gtk/gtkclipboard-quartz.c
+++ b/gtk/gtkclipboard-quartz.c
@@ -110,9 +110,10 @@ struct _GtkClipboardClass
clipboard->get_func (clipboard, &selection_data,
info,
clipboard->user_data);
-
- _gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard,
- &selection_data);
+
+ if (selection_data.length >= 0)
+ _gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard,
+ &selection_data);
g_free (selection_data.data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]