diff options
| author | Tom Yu <tlyu@mit.edu> | 1999-02-13 02:12:29 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 1999-02-13 02:12:29 +0000 |
| commit | 6735c54630c8cd5b0114fa1817be2202b727bc5a (patch) | |
| tree | b02a5cb913e308caef9c1d8ad9c9aabed52461e3 | |
| parent | 5b62060b37853b9d9426478b6d3e15023bfdcdb7 (diff) | |
| download | krb5-6735c54630c8cd5b0114fa1817be2202b727bc5a.tar.gz krb5-6735c54630c8cd5b0114fa1817be2202b727bc5a.tar.xz krb5-6735c54630c8cd5b0114fa1817be2202b727bc5a.zip | |
* ftpd.c: strcat -> strncat
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11172 dc483132-0cff-0310-8789-dd5450dbe970
| -rw-r--r-- | src/appl/gssftp/ftpd/ChangeLog | 4 | ||||
| -rw-r--r-- | src/appl/gssftp/ftpd/ftpd.c | 13 |
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 ? |
