Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Bug 508601 - Copying from GTK+ applications causes crash
Browse files Browse the repository at this point in the history
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 ...
  • Loading branch information
Kristian Rietveld committed Jul 25, 2011
1 parent b0dd7e1 commit 8d69f3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gtk/gtkclipboard-quartz.c
Expand Up @@ -110,9 +110,10 @@ struct _GtkClipboardClass
clipboard->get_func (clipboard, &selection_data, clipboard->get_func (clipboard, &selection_data,
info, info,
clipboard->user_data); clipboard->user_data);


_gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard, if (selection_data.length >= 0)
&selection_data); _gtk_quartz_set_selection_data_for_pasteboard (clipboard->pasteboard,
&selection_data);


g_free (selection_data.data); g_free (selection_data.data);
} }
Expand Down

0 comments on commit 8d69f3d

Please sign in to comment.