diff options
author | sobomax <sobomax@FreeBSD.org> | 2001-10-16 09:21:09 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2001-10-16 09:21:09 +0000 |
commit | 142817d167a9466bab9524602dae6b8f12261f61 (patch) | |
tree | 8b354d82d9ebecd2d39cb61860656f9bcf069c56 /usr.bin/telnet | |
parent | f564c6a2da75eca8beb14d6f54c17b9a7c2a828f (diff) | |
download | FreeBSD-src-142817d167a9466bab9524602dae6b8f12261f61.zip FreeBSD-src-142817d167a9466bab9524602dae6b8f12261f61.tar.gz |
Use strlcpy(3) instead of strcpy(3) to copy optarg into a fixed-size buffer.
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/telnet')
-rw-r--r-- | usr.bin/telnet/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/telnet/main.c b/usr.bin/telnet/main.c index 0f627b2..d91fa78 100644 --- a/usr.bin/telnet/main.c +++ b/usr.bin/telnet/main.c @@ -251,8 +251,8 @@ main(argc, argv) break; case 't': #if defined(TN3270) && defined(unix) + (void)strlcpy(tline, optarg, sizeof(tline)); transcom = tline; - (void)strcpy(transcom, optarg); #else fprintf(stderr, "%s: Warning: -t ignored, no TN3270 support.\n", |