summaryrefslogtreecommitdiffstats
path: root/crypto/kerberosIV/appl/ftp/ftpd/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/kerberosIV/appl/ftp/ftpd/popen.c')
-rw-r--r--crypto/kerberosIV/appl/ftp/ftpd/popen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/kerberosIV/appl/ftp/ftpd/popen.c b/crypto/kerberosIV/appl/ftp/ftpd/popen.c
index 58c4985..4bd5e04 100644
--- a/crypto/kerberosIV/appl/ftp/ftpd/popen.c
+++ b/crypto/kerberosIV/appl/ftp/ftpd/popen.c
@@ -37,7 +37,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
-RCSID("$Id: popen.c,v 1.16 1997/06/01 03:14:06 assar Exp $");
+RCSID("$Id: popen.c,v 1.18 1998/06/09 19:24:24 joda Exp $");
#endif
#include <sys/types.h>
@@ -89,10 +89,10 @@ ftp_rooted(const char *path)
if(!home[0])
if((pwd = k_getpwnam("ftp")))
- strcpy(home, pwd->pw_dir);
+ strcpy_truncate(home, pwd->pw_dir, sizeof(home));
snprintf(newpath, sizeof(newpath), "%s/%s", home, path);
if(access(newpath, X_OK))
- strcpy(newpath, path);
+ strcpy_truncate(newpath, path, sizeof(newpath));
return newpath;
}
@@ -125,8 +125,8 @@ ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
return (NULL);
/* break up string into pieces */
+ foo = NULL;
for (argc = 0, cp = program;; cp = NULL) {
- foo = NULL;
if (!(argv[argc++] = strtok_r(cp, " \t\n", &foo)))
break;
}
OpenPOWER on IntegriCloud