summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-10-16 09:21:09 +0000
committersobomax <sobomax@FreeBSD.org>2001-10-16 09:21:09 +0000
commit142817d167a9466bab9524602dae6b8f12261f61 (patch)
tree8b354d82d9ebecd2d39cb61860656f9bcf069c56 /usr.bin
parentf564c6a2da75eca8beb14d6f54c17b9a7c2a828f (diff)
downloadFreeBSD-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')
-rw-r--r--usr.bin/colldef/parse.y2
-rw-r--r--usr.bin/telnet/main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y
index a5806d1..af247a5 100644
--- a/usr.bin/colldef/parse.y
+++ b/usr.bin/colldef/parse.y
@@ -242,7 +242,7 @@ main(ac, av)
break;
case 'I':
- strcpy(map_name, optarg);
+ strlcpy(map_name, optarg, sizeof(map_name));
break;
default:
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",
OpenPOWER on IntegriCloud