From 1428a82d1644166fdaa5285c67f236ac02687818 Mon Sep 17 00:00:00 2001 From: in2 Date: Sun, 21 Jul 2002 08:18:42 +0000 Subject: strcpy() -> strlcpy() git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@428 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/gamble.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mbbsd/gamble.c') diff --git a/mbbsd/gamble.c b/mbbsd/gamble.c index 5a93c275..1fa62e13 100644 --- a/mbbsd/gamble.c +++ b/mbbsd/gamble.c @@ -1,4 +1,4 @@ -/* $Id: gamble.c,v 1.25 2002/07/05 17:10:27 in2 Exp $ */ +/* $Id: gamble.c,v 1.26 2002/07/21 08:18:41 in2 Exp $ */ #include "bbs.h" #ifndef _BBS_UTIL_C_ @@ -33,8 +33,8 @@ post_msg(char *bname, char *title, char *msg, char *author) fclose(fp); /* 將檔案加入列表 */ - strcpy(fhdr.title, title); - strcpy(fhdr.owner, author); + strlcpy(fhdr.title, title, sizeof(fhdr.title)); + strlcpy(fhdr.owner, author, sizeof(fhdr.owner)); setbdir(genbuf, bname); if (append_record(genbuf, &fhdr, sizeof(fhdr)) != -1) if ((bid = getbnum(bname)) > 0) -- cgit v1.2.3