link_inode(parent, ino);
- strcpy(ino->i_name, name);
+ strlcpy(ino->i_name, name, sizeof(ino->i_name));
/* hash_add(ino); */
slot = hash_dentry(parent, ino->i_name);
*/
if (!prefix[0] && p[0] == '/') p++;
- strcpy(path, prefix);
- strcpy(&path[plen], p);
+ strlcpy(path, prefix, PATH_MAX);
+ strlcpy(&path[plen], p, PATH_MAX - plen);
dprintf(("%s: make_path: resulting path is '%s'\n", sffs_name, path));
return ENAMETOOLONG;
if (len > 0) path[len++] = '/';
- strcpy(&path[len], name);
+ strlcpy(&path[len], name, PATH_MAX - len);
return OK;
}