Skip to content
Snippets Groups Projects
Commit 9772bbed authored by Lactozilla's avatar Lactozilla :speech_balloon:
Browse files

Fix buffer overrun in I_ClipboardPaste

parent cc677d2d
No related branches found
No related tags found
No related merge requests found
......@@ -2726,10 +2726,10 @@ const char *I_ClipboardPaste(void)
if (!SDL_HasClipboardText())
return NULL;
clipboard_contents = SDL_GetClipboardText();
memcpy(clipboard_modified, clipboard_contents, 255);
strlcpy(clipboard_modified, clipboard_contents, 256);
SDL_free(clipboard_contents);
clipboard_modified[255] = 0;
while (*i)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment