Re: [Spice-devel] [PATCH 3/5] x11: don't return freed memory from get_clipboard

2011-07-18 Thread Alon Levy
On Fri, Jul 08, 2011 at 12:17:30PM +0200, Christophe Fergeau wrote: There is a double free in client/x11/platform.cpp. In get_selection(), in the exit: case with ret_val == -1 and data != NULL, *data_ret (which is returned to the caller) has already been assigned data, so it will be pointing

[Spice-devel] [PATCH 3/5] x11: don't return freed memory from get_clipboard

2011-07-08 Thread Christophe Fergeau
There is a double free in client/x11/platform.cpp. In get_selection(), in the exit: case with ret_val == -1 and data != NULL, *data_ret (which is returned to the caller) has already been assigned data, so it will be pointing to freed memory when data is XFree'd'. Then in handle_selection_notify,