mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-14 06:18:50 +00:00
Fix to buffer overrun in SDL_JoystickGetGUIDString().
This commit is contained in:
parent
4b942c5a07
commit
f06eeb013b
@ -776,7 +776,7 @@ void SDL_JoystickGetGUIDString( SDL_JoystickGUID guid, char *pszGUID, int cbGUID
|
||||
return;
|
||||
}
|
||||
|
||||
for ( i = 0; i < sizeof(guid.data) && i < (cbGUID-1); i++ )
|
||||
for ( i = 0; i < sizeof(guid.data) && i < (cbGUID-1)/2; i++ )
|
||||
{
|
||||
/* each input byte writes 2 ascii chars, and might write a null byte. */
|
||||
/* If we don't have room for next input byte, stop */
|
||||
|
Loading…
Reference in New Issue
Block a user