diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-12 13:00:08 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-12 13:00:08 +0800 |
commit | 927c9665ce01fdade6a0846ad60a561320272440 (patch) | |
tree | e84f4cb1a3aa4403408b96fd9aa4ecf6db84eab5 /mbbsd/announce.c | |
parent | 395dca515d5b5e9b6d5d3666b96b7fc573e12bc2 (diff) | |
download | pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.gz pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.bz2 pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.lz pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.xz pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.zst pttbbs-927c9665ce01fdade6a0846ad60a561320272440.zip |
replace some strncpy with strlcpy, or just strcpy if src is const
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3267 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/announce.c')
-rw-r--r-- | mbbsd/announce.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c index f294140b..81944e9e 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -673,8 +673,7 @@ a_pastetagpost(menu_t * pm, int mode) setbfile(buf, bh->brdname, fhdr.filename); if (dashf(buf)) { - strncpy(title + 3, fhdr.title, TTLEN - 3); - title[TTLEN] = '\0'; + strlcpy(title + 3, fhdr.title, sizeof(title) - 3); a_copyitem(buf, title, 0, 0); if (mode) { mode--; |