summaryrefslogtreecommitdiff
path: root/libexec/telnetd/telnetd.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-04-14 17:41:56 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-04-14 17:41:56 +0000
commite1fb6fa38be3079e3ffc548acead593f9a3b444c (patch)
treefe32a900ee7bef9f7bd80917d14c5e2f54201bc1 /libexec/telnetd/telnetd.c
parent7aa20daaa39223d065c65ab236958b5c843f1668 (diff)
Change terminalname from a pointer to an array. Why people hide
the actual storage array as a static inside a function is beyond me. By exposing the real array we can use sizeof on it for strlcpy. deraadt@ OK
Diffstat (limited to 'libexec/telnetd/telnetd.c')
-rw-r--r--libexec/telnetd/telnetd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/telnetd/telnetd.c b/libexec/telnetd/telnetd.c
index a44f23c7b10..361e590777a 100644
--- a/libexec/telnetd/telnetd.c
+++ b/libexec/telnetd/telnetd.c
@@ -639,7 +639,7 @@ getterminaltype(char *name, size_t name_sz)
*/
_gettermname();
if (strncmp(first, terminaltype, sizeof(first)) != 0)
- strcpy(terminaltype, first);
+ strlcpy(terminaltype, first, sizeof(terminaltype));
break;
}
}