Mercurial > sdl-ios-xcode
diff src/joystick/macos/SDL_sysjoystick.c @ 1379:c0a74f199ecf
Use only safe string functions
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 19 Feb 2006 23:46:34 +0000 |
parents | 19418e4422cb |
children | d910939febfa |
line wrap: on
line diff
--- a/src/joystick/macos/SDL_sysjoystick.c Sun Feb 19 23:38:57 2006 +0000 +++ b/src/joystick/macos/SDL_sysjoystick.c Sun Feb 19 23:46:34 2006 +0000 @@ -165,7 +165,7 @@ return(-1); } SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata)); - SDL_strcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index)); + SDL_strlcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index), SDL_arraysize(joystick->hwdata->name)); joystick->name = joystick->hwdata->name; ISpElementList_ExtractByKind(