Commit af3014b3 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winex11.drv: Fix buffer allocation size in import_xdnd_selection().

parent 8f76cc68
......@@ -1308,7 +1308,7 @@ struct format_entry *import_xdnd_selection( Display *display, Window win, Atom s
if (!(data = import_selection( display, win, selection, format, &size ))) continue;
entry_size = (FIELD_OFFSET( struct format_entry, data[size] ) + 7) & ~7;
if (buf_size < size + entry_size)
if (buf_size < *ret_size + entry_size)
{
if (!(tmp = realloc( ret, *ret_size + entry_size + 1024 ))) continue;
ret = tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment