summaryrefslogtreecommitdiffstats
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-12-09 20:49:20 +0000
committereivind <eivind@FreeBSD.org>1998-12-09 20:49:20 +0000
commit0e52448bcc33b009d482daa2563e9e00fb2b427f (patch)
treebae7288f54d96a8dad6ba5bcb361da8efcf5513e /usr.bin/ftp
parentb35cc94e308922108f2a1787a976b5ff6c2e04f4 (diff)
downloadFreeBSD-src-0e52448bcc33b009d482daa2563e9e00fb2b427f.zip
FreeBSD-src-0e52448bcc33b009d482daa2563e9e00fb2b427f.tar.gz
Better error checking.
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/ftp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c
index 1378be4..a1e49a3 100644
--- a/usr.bin/ftp/ftp.c
+++ b/usr.bin/ftp/ftp.c
@@ -1,4 +1,4 @@
-/* $Id: ftp.c,v 1.13 1998/06/09 04:30:51 imp Exp $ */
+/* $Id: ftp.c,v 1.14 1998/07/26 18:49:36 imp Exp $ */
/* $NetBSD: ftp.c,v 1.29.2.1 1997/11/18 01:01:04 mellon Exp $ */
/*
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$Id: ftp.c,v 1.13 1998/06/09 04:30:51 imp Exp $");
+__RCSID("$Id: ftp.c,v 1.14 1998/07/26 18:49:36 imp Exp $");
__RCSID_SOURCE("$NetBSD: ftp.c,v 1.29.2.1 1997/11/18 01:01:04 mellon Exp $");
#endif
#endif /* not lint */
@@ -333,7 +333,8 @@ getreply(expecteof)
if (dig > 4 && pflag == 1 && isdigit((unsigned char)c))
pflag = 2;
if (pflag == 2) {
- if (c != '\r' && c != ')')
+ if (c != '\r' && c != ')' &&
+ pt < &pasv[sizeof(pasv)-1])
*pt++ = c;
else {
*pt = '\0';
OpenPOWER on IntegriCloud