summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/appl/gssftp/ftpd/ChangeLog4
-rw-r--r--src/appl/gssftp/ftpd/ftpd.c13
2 files changed, 12 insertions, 5 deletions
diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog
index 8a0dbc8e0..bf2c78968 100644
--- a/src/appl/gssftp/ftpd/ChangeLog
+++ b/src/appl/gssftp/ftpd/ChangeLog
@@ -1,3 +1,7 @@
+Fri Feb 12 21:11:18 1999 Tom Yu <tlyu@mit.edu>
+
+ * ftpd.c: strcat -> strncat
+
1998-11-13 Theodore Ts'o <tytso@rsts-11.mit.edu>
* Makefile.in: Set the myfulldir and mydir variables (which are
diff --git a/src/appl/gssftp/ftpd/ftpd.c b/src/appl/gssftp/ftpd/ftpd.c
index db424a597..897a81433 100644
--- a/src/appl/gssftp/ftpd/ftpd.c
+++ b/src/appl/gssftp/ftpd/ftpd.c
@@ -596,7 +596,8 @@ path_expand(path)
}
}
}
- return strcat(pathbuf, path);
+ return strncat(pathbuf, path,
+ sizeof (pathbuf) - strlen(pathbuf) - 1);
}
/*
@@ -728,11 +729,13 @@ user(name)
#endif /* KRB5_KRB4_COMPAT */
if (!authorized && authlevel == AUTHLEVEL_AUTHORIZE) {
- strcat(buf, "; Access denied.");
+ strncat(buf, "; Access denied.",
+ sizeof(buf) - strlen(buf) - 1);
result = 530;
pw = NULL;
} else if (!authorized || (want_creds && !have_creds)) {
- strcat(buf, "; Password required.");
+ strncat(buf, "; Password required.",
+ sizeof(buf) - strlen(buf) - 1);
askpasswd = 1;
result = 331;
} else
@@ -1611,7 +1614,7 @@ statcmd()
sprintf(&str[strlen(str)], ", FORM: %s", formnames[form]);
if (type == TYPE_L)
#if 1
- strcat(str, " 8");
+ strncat(str, " 8", sizeof (str) - strlen(str) - 1);
#else
/* this is silly. -- eichin@cygnus.com */
#if NBBY == 8
@@ -1681,7 +1684,7 @@ reply(n, fmt, p0, p1, p2, p3, p4, p5)
int length, kerror;
if (n) sprintf(in, "%d%c", n, cont_char);
else in[0] = '\0';
- strcat(in, buf);
+ strncat(in, buf, sizeof (in) - strlen(in) - 1);
#ifdef KRB5_KRB4_COMPAT
if (strcmp(auth_type, "KERBEROS_V4") == 0) {
if ((length = clevel == PROT_P ?