diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-21 16:18:42 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-21 16:18:42 +0800 |
commit | 1428a82d1644166fdaa5285c67f236ac02687818 (patch) | |
tree | 276d0104ebeaef1c5ce7ab7cf8484a685669a15d /mbbsd/voteboard.c | |
parent | 913a0db139ff6f56e26d1199e7f5ad1c6239c5ea (diff) | |
download | pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar.gz pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar.bz2 pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar.lz pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar.xz pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.tar.zst pttbbs-1428a82d1644166fdaa5285c67f236ac02687818.zip |
strcpy() -> strlcpy()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@428 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/voteboard.c')
-rw-r--r-- | mbbsd/voteboard.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mbbsd/voteboard.c b/mbbsd/voteboard.c index d3df2540..1aa05ee9 100644 --- a/mbbsd/voteboard.c +++ b/mbbsd/voteboard.c @@ -1,4 +1,4 @@ -/* $Id: voteboard.c,v 1.10 2002/07/20 15:33:46 in2 Exp $ */ +/* $Id: voteboard.c,v 1.11 2002/07/21 08:18:42 in2 Exp $ */ #include "bbs.h" #define VOTEBOARD "NewBoard" @@ -61,7 +61,7 @@ do_voteboardreply(fileheader_t * fhdr) fclose(fp); return; } - strcpy(reason, genbuf + 19); + strlcpy(reason, genbuf + 19, sizeof(reason)); } } fclose(fp); @@ -420,8 +420,8 @@ do_voteboard() "®É¶¡: ", ctime(&now)); fprintf(fp, "%s\n", genbuf); fclose(fp); - strcpy(votefile.owner, cuser.userid); - strcpy(votefile.title, title); + strlcpy(votefile.owner, cuser.userid, sizeof(votefile.owner)); + strlcpy(votefile.title, title, sizeof(votefile.title)); setbdir(genbuf, currboard); if (append_record(genbuf, &votefile, sizeof(votefile)) != -1) setbtotal(currbid); |