Author: kirilla Date: 2011-02-23 01:37:01 +0100 (Wed, 23 Feb 2011) New Revision: 40628 Changeset: http://dev.haiku-os.org/changeset/40628 Modified: haiku/trunk/src/bin/network/telnet/commands.c Log: Unsafe use of strncpy replaced by strlcpy. CID 2257. Modified: haiku/trunk/src/bin/network/telnet/commands.c =================================================================== --- haiku/trunk/src/bin/network/telnet/commands.c 2011-02-23 00:30:17 UTC (rev 40627) +++ haiku/trunk/src/bin/network/telnet/commands.c 2011-02-23 00:37:01 UTC (rev 40628) @@ -2271,7 +2271,7 @@ 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) {