From cc8f50e3197c7304733c2f63fc324790036ea376 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sat, 8 Jun 1996 21:57:44 +0000 Subject: [PATCH] Changed snprintf to sprintf. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@572 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/ftpd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index 0965c67fe..e495fbfd4 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -665,8 +665,7 @@ int do_login(int code, char *passwd) if (guest) { reply(code, "Guest login ok, access restrictions apply."); #ifdef HAVE_SETPROCTITLE - snprintf(proctitle, sizeof(proctitle), - "%s: anonymous/%.*s", remotehost, + sprintf(proctitle, "%s: anonymous/%.*s", remotehost, sizeof(proctitle) - sizeof(remotehost) - sizeof(": anonymous/"), passwd); setproctitle(proctitle); @@ -677,8 +676,7 @@ int do_login(int code, char *passwd) } else { reply(code, "User %s logged in.", pw->pw_name); #ifdef HAVE_SETPROCTITLE - snprintf(proctitle, sizeof(proctitle), - "%s: %s", remotehost, pw->pw_name); + sprintf(proctitle, "%s: %s", remotehost, pw->pw_name); setproctitle(proctitle); #endif /* HAVE_SETPROCTITLE */ if (logging) @@ -1235,7 +1233,7 @@ statfilecmd(char *filename) int c; char line[LINE_MAX]; - (void)snprintf(line, sizeof(line), "/bin/ls -lA %s", filename); + sprintf(line, "/bin/ls -lA %s", filename); fin = ftpd_popen(line, "r"); lreply(211, "status of %s:", filename); while ((c = getc(fin)) != EOF) { @@ -1499,7 +1497,7 @@ dolog(struct sockaddr_in *sin) (void) strncpy(remotehost, inet_ntoa(sin->sin_addr), sizeof(remotehost)); #ifdef HAVE_SETPROCTITLE - snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost); + sprintf(proctitle, "%s: connected", remotehost); setproctitle(proctitle); #endif /* HAVE_SETPROCTITLE */