diff options
author | 1998-09-10 06:44:41 +0000 | |
---|---|---|
committer | 1998-09-10 06:44:41 +0000 | |
commit | c8c5c6d860de0fffed545f6088b9e1439eca4d88 (patch) | |
tree | 8a80354eede5e6cde4a0ef9bf9b032798585a968 | |
parent | clean up some files 'make distclean' on the GNU Makefile does not clean up (diff) | |
download | wireguard-openbsd-c8c5c6d860de0fffed545f6088b9e1439eca4d88.tar.xz wireguard-openbsd-c8c5c6d860de0fffed545f6088b9e1439eca4d88.zip |
proper strncpy
-rw-r--r-- | usr.bin/compress/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/compress/main.c b/usr.bin/compress/main.c index 209c3ffe7b6..3825ff63fb2 100644 --- a/usr.bin/compress/main.c +++ b/usr.bin/compress/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.9 1998/03/10 16:34:03 mickey Exp $ */ +/* $OpenBSD: main.c,v 1.10 1998/09/10 06:44:41 deraadt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)compress.c 8.2 (Berkeley) 1/7/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.9 1998/03/10 16:34:03 mickey Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.10 1998/09/10 06:44:41 deraadt Exp $"; #endif #endif /* not lint */ @@ -180,6 +180,7 @@ main(argc, argv) break; case 'o': strncpy(outfile, optarg, sizeof(outfile)-1); + outfile[sizeof(outfile)-1] = '\0'; break; case 'q': verbose = -1; |