Unsafe use of strncpy replaced by strlcpy. CID 2257.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40628 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7d5b23fb44
commit
117711e680
@ -2271,7 +2271,7 @@ tn(int argc, char *argv[])
|
||||
hostname = hostp;
|
||||
memset(&su, 0, sizeof su);
|
||||
su.sun_family = AF_UNIX;
|
||||
strncpy(su.sun_path, hostp, sizeof su.sun_path);
|
||||
strlcpy(su.sun_path, hostp, sizeof su.sun_path);
|
||||
printf("Trying %s...\n", hostp);
|
||||
net = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||
if ( net < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user