mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'clipboard-crash-fix-2' into 'next'
Fix buffer overrun in I_ClipboardPaste (resolves #205) Closes #205 See merge request STJr/SRB2!1105
This commit is contained in:
commit
fa18f819b0
1 changed files with 2 additions and 2 deletions
|
|
@ -2727,10 +2727,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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue