diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-23 03:02:01 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-23 03:02:01 +0800 |
commit | 8b45fd166b943e17dabb3f5cdf972baeb58e0346 (patch) | |
tree | 7b2e5bf09b7c9fd812d0ae7cacdfa049c4dc1e07 /mbbsd/args.c | |
parent | a1bd04d7decea39d51bbc06b50755976d4184c50 (diff) | |
download | pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.gz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.bz2 pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.lz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.xz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.zst pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.zip |
sprintf() -> snprintf()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@435 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/args.c')
-rw-r--r-- | mbbsd/args.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/args.c b/mbbsd/args.c index e517b512..1d128673 100644 --- a/mbbsd/args.c +++ b/mbbsd/args.c @@ -1,4 +1,4 @@ -/* $Id: args.c,v 1.6 2002/07/21 20:39:34 kcwu Exp $ */ +/* $Id: args.c,v 1.7 2002/07/22 19:02:00 in2 Exp $ */ #include "bbs.h" #ifdef HAVE_SETPROCTITLE @@ -49,7 +49,7 @@ do_setproctitle(const char *cmdline) if (i > LastArgv - Argv[0] - 2) { i = LastArgv - Argv[0] - 2; } - strlcpy(Argv[0], buf, SIZEOF(Argv[0]); + strlcpy(Argv[0], buf, sizeof(buf)); p = &Argv[0][i]; while (p < LastArgv) *p++ = '\0'; @@ -62,7 +62,7 @@ setproctitle(const char *format,...) char buf[256]; va_list args; va_start(args, format); - vsprintf(buf, format, args); + vsnprintf(buf, sizeof(buf), format, args); do_setproctitle(buf); va_end(args); } |