diff options
author | pst <pst@FreeBSD.org> | 1996-07-15 16:29:03 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1996-07-15 16:29:03 +0000 |
commit | bf393959c2b460929c0bb7624f49c5eb2a871acb (patch) | |
tree | 0b9cbf642d6fa87cfb59cf9132bda3b4a74e6e23 /usr.bin/rlogin | |
parent | f62903a803d2a4dd6e3eedcc76b7d5cccbd7aab2 (diff) | |
download | FreeBSD-src-bf393959c2b460929c0bb7624f49c5eb2a871acb.zip FreeBSD-src-bf393959c2b460929c0bb7624f49c5eb2a871acb.tar.gz |
Do a bounds check on the strcpy of environment variables onto the stack.
Diffstat (limited to 'usr.bin/rlogin')
-rw-r--r-- | usr.bin/rlogin/rlogin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/rlogin/rlogin.c b/usr.bin/rlogin/rlogin.c index 4110c6f..254c05f 100644 --- a/usr.bin/rlogin/rlogin.c +++ b/usr.bin/rlogin/rlogin.c @@ -259,7 +259,7 @@ main(argc, argv) exit(1); } - (void)strcpy(term, (p = getenv("TERM")) ? p : "network"); + (void)strncpy(term, (p = getenv("TERM")) ? p : "network", sizeof(term)); if (ioctl(0, TIOCGETP, &ttyb) == 0) { (void)strcat(term, "/"); (void)strcat(term, speeds[(int)ttyb.sg_ospeed]); |