1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

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

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55443
This commit is contained in:
Paul Gofman 2023-08-14 15:38:49 -06:00 committed by Alexandre Julliard
parent 8f76cc687d
commit af3014b3e1

View file

@ -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;