From: Alex Henrie alexhenrie24@gmail.com
--- dlls/winex11.drv/clipboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c index 6ebc36cbead..47839e4925c 100644 --- a/dlls/winex11.drv/clipboard.c +++ b/dlls/winex11.drv/clipboard.c @@ -1285,7 +1285,7 @@ struct format_entry *import_xdnd_selection( Display *display, Window win, Atom s UINT i; void *data; struct clipboard_format *format; - struct format_entry *ret = NULL, *entry; + struct format_entry *ret = NULL, *tmp, *entry; BOOL have_hdrop = FALSE;
register_x11_formats( targets, count ); @@ -1310,7 +1310,8 @@ struct format_entry *import_xdnd_selection( Display *display, Window win, Atom s entry_size = (FIELD_OFFSET( struct format_entry, data[size] ) + 7) & ~7; if (buf_size < size + entry_size) { - if (!(ret = realloc( ret, *ret_size + entry_size + 1024 ))) continue; + if (!(tmp = realloc( ret, *ret_size + entry_size + 1024 ))) continue; + ret = tmp; buf_size = *ret_size + entry_size + 1024; /* extra space for following entries */ } entry = (struct format_entry *)((char *)ret + *ret_size);