diff options
author | 1998-02-10 02:13:10 +0000 | |
---|---|---|
committer | 1998-02-10 02:13:10 +0000 | |
commit | 78889c9affe4d200a49b16d34de36286683851d0 (patch) | |
tree | 03d4a0c14890181dc932c1ee91a7a8ef5efd4ff8 /usr.bin/ftp/ftp.c | |
parent | from netbsd (diff) | |
download | wireguard-openbsd-78889c9affe4d200a49b16d34de36286683851d0.tar.xz wireguard-openbsd-78889c9affe4d200a49b16d34de36286683851d0.zip |
Fix buffer overflows in quote1(), clear line buffer
before use. Hopefully, this is the last of the
PR# 406 stuff that this will need.
Diffstat (limited to 'usr.bin/ftp/ftp.c')
-rw-r--r-- | usr.bin/ftp/ftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index 29be2baeecf..342efadf7d0 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp.c,v 1.24 1997/12/17 16:03:03 millert Exp $ */ +/* $OpenBSD: ftp.c,v 1.25 1998/02/10 02:13:10 weingart Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -static char rcsid[] = "$OpenBSD: ftp.c,v 1.24 1997/12/17 16:03:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: ftp.c,v 1.25 1998/02/10 02:13:10 weingart Exp $"; #endif #endif /* not lint */ @@ -279,6 +279,7 @@ getreply(expecteof) int pflag = 0; char *cp, *pt = pasv; + memset(current_line, 0, sizeof(current_line)); oldintr = signal(SIGINT, cmdabort); for (line = 0 ;; line++) { dig = n = code = 0; |