summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-22 04:39:34 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-22 04:39:34 +0800
commit1357136003927f736b8d3e91c1970d4cc7861977 (patch)
treec3ae703bebaadc6d54926280fa0721718e50703f /mbbsd/mbbsd.c
parent290e94c252bf0d1b384b3775cd9de04f5afa341a (diff)
downloadpttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.gz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.bz2
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.lz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.xz
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.tar.zst
pttbbs-1357136003927f736b8d3e91c1970d4cc7861977.zip
check the using of `sizeof' with strlcpy()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@432 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 012974ec..6b3e15f3 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.42 2002/07/21 09:26:02 in2 Exp $ */
+/* $Id: mbbsd.c,v 1.43 2002/07/21 20:39:34 kcwu Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -733,7 +733,7 @@ setup_utmp(int mode)
#ifndef FAST_LOGIN
setuserfile(buf, "remoteuser");
- strlcpy(remotebuf, fromhost, sizeof(remotebuf));
+ strlcpy(remotebuf, fromhost, SIZEOF(remotebuf));
strcat(remotebuf, ctime(&now));
remotebuf[strlen(remotebuf) - 1] = 0;
add_distinct(buf, remotebuf);
@@ -1114,7 +1114,7 @@ getremotename(struct sockaddr_in * from, char *rhost, char *rname)
*/
if ((cp = (char *)strchr(user, '\r')))
*cp = 0;
- strlcpy(rname, user, sizeof(rname));
+ strlcpy(rname, user, SIZEOF(rname));
}
}
alarm(0);