mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
iscsi-scst: replace strncpy() by strlcpy()
Follow up for r7109: strlcpy() is more appropriate in this place. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -415,8 +415,7 @@ int target_create(const char *name, struct target **out_target)
|
||||
}
|
||||
|
||||
memset(target, 0, sizeof(*target));
|
||||
strncpy(target->name, name, sizeof(target->name) - 1);
|
||||
target->name[sizeof(target->name)-1] = '\0';
|
||||
strlcpy(target->name, name, sizeof(target->name));
|
||||
|
||||
params_set_defaults(target->target_params, target_keys);
|
||||
params_set_defaults(target->session_params, session_keys);
|
||||
|
||||
Reference in New Issue
Block a user