From b91ddbc3e2cd7e798750c3d99bbcc93ec98b1a8b Mon Sep 17 00:00:00 2001 From: Guldoman Date: Sun, 9 Oct 2022 06:15:18 +0200 Subject: [PATCH] wayland: null-terminate drop data --- src/video/wayland/SDL_waylandevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 6b504e5ab..8b53424fc 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -1683,7 +1683,7 @@ data_device_handle_drop(void *data, struct wl_data_device *wl_data_device) /* TODO: SDL Support more mime types */ size_t length; void *buffer = Wayland_data_offer_receive(data_device->drag_offer, - &length, FILE_MIME, SDL_FALSE); + &length, FILE_MIME, SDL_TRUE); if (buffer) { char *saveptr = NULL; char *token = SDL_strtokr((char *) buffer, "\r\n", &saveptr);