From b3bdc0360ad8d86422e84055c32cfee26d04db9f Mon Sep 17 00:00:00 2001 From: in2 Date: Sun, 2 Oct 2005 03:16:13 +0000 Subject: use strlcpy() git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3219 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/record.c b/mbbsd/record.c index b1b9a9cf..e765198d 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -53,7 +53,7 @@ get_sum_records(const char *fpath, int size) p++; while (fread(&fhdr, size, 1, fp)==1) { - strcpy(p, fhdr.filename); + strlcpy(p, fhdr.filename, sizeof(buf) - (p - buf)); if (stat(buf, &st) == 0 && S_ISREG(st.st_mode) && st.st_nlink == 1) ans += st.st_size; } -- cgit v1.2.3