diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-22 14:19:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-22 14:19:52 +0000 |
commit | 5122fe4438456655464e8959458360767fb0790e (patch) | |
tree | 141160c4e1a70bfcd3b7eec45a4719202699fdec | |
parent | a7a77797f173e4f1741f35e901856715d5633350 (diff) |
buf oflow; bmartin@obscure.sekurity.org
-rw-r--r-- | libexec/uucpd/uucpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index 0f956cf2b7a..10a408b807a 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -42,7 +42,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: uucpd.c,v 1.11 1997/08/31 08:24:01 deraadt Exp $"; +static char rcsid[] = "$Id: uucpd.c,v 1.12 1998/04/22 14:19:51 deraadt Exp $"; #endif /* not lint */ /* @@ -304,7 +304,8 @@ struct sockaddr_in *sin; time(&ll.ll_time); lseek(f, pw->pw_uid * sizeof(struct lastlog), 0); - strcpy(line, remotehost); + strncpy(line, remotehost, sizeof line-1); + line[sizeof line-1] = '\0'; SCPYN(ll.ll_line, line); SCPYN(ll.ll_host, remotehost); (void) write(f, (char *) &ll, sizeof ll); |