summaryrefslogtreecommitdiffstats
path: root/mbbsd/board.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-14 18:51:38 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-14 18:51:38 +0800
commite4bb2cf60d983f0f73af06c1d8b3576238c81cda (patch)
treef9ce584f5497fefd4881495a5f4a7a4e26ea577f /mbbsd/board.c
parentca9e8ad9b082a862006d7692a632e0516484b22a (diff)
downloadpttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar.gz
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar.bz2
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar.lz
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar.xz
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.tar.zst
pttbbs-e4bb2cf60d983f0f73af06c1d8b3576238c81cda.zip
fix bug when enlarge the MAX_BOARDS
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1332 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/board.c')
-rw-r--r--mbbsd/board.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 10233267..a08bfd73 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -438,6 +438,7 @@ void updatenewfav(int mode)
if( (fd = open(fname, O_RDWR, 0600)) != -1 ){
brd = (char *)malloc((numboards + 1) * sizeof(char));
+ memset(brd, 0, (numboards + 1) * sizeof(char));
read(fd, brd, (numboards + 1) * sizeof(char));
for(i = 0; i < numboards + 1 && brd[i] != BRD_END; i++){