mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Fix buffer overrun in I_ClipboardPaste
This commit is contained in:
parent
8eaee1c462
commit
ed068a7664
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…
Add table
Reference in a new issue