mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-07 00:41:26 +00:00
Fix buffer overrun in I_ClipboardPaste
This commit is contained in:
parent
cc677d2d50
commit
9772bbeda1
1 changed files with 2 additions and 2 deletions
|
@ -2726,10 +2726,10 @@ const char *I_ClipboardPaste(void)
|
||||||
|
|
||||||
if (!SDL_HasClipboardText())
|
if (!SDL_HasClipboardText())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
clipboard_contents = SDL_GetClipboardText();
|
clipboard_contents = SDL_GetClipboardText();
|
||||||
memcpy(clipboard_modified, clipboard_contents, 255);
|
strlcpy(clipboard_modified, clipboard_contents, 256);
|
||||||
SDL_free(clipboard_contents);
|
SDL_free(clipboard_contents);
|
||||||
clipboard_modified[255] = 0;
|
|
||||||
|
|
||||||
while (*i)
|
while (*i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue