Unsafe use of strncpy replaced by strlcpy. CID 2259.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40626 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d4f0eca634
commit
c4035e9124
@ -167,10 +167,10 @@ _BJoystickTweaker::_BuildFromJoystickDesc(char *string, _joystick_info* info)
|
||||
|
||||
if (str.IFindFirst("module") != -1) {
|
||||
str.RemoveFirst("module = ");
|
||||
strncpy(info->module_name, str.String(), STRINGLENGTHCPY);
|
||||
strlcpy(info->module_name, str.String(), STRINGLENGTHCPY);
|
||||
} else if (str.IFindFirst("gadget") != -1) {
|
||||
str.RemoveFirst("gadget = ");
|
||||
strncpy(info->controller_name, str.String(), STRINGLENGTHCPY);
|
||||
strlcpy(info->controller_name, str.String(), STRINGLENGTHCPY);
|
||||
} else if (str.IFindFirst("num_axes") != -1) {
|
||||
str.RemoveFirst("num_axes = ");
|
||||
info->num_axes = atoi(str.String());
|
||||
|
Loading…
Reference in New Issue
Block a user