From e4bb2cf60d983f0f73af06c1d8b3576238c81cda Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 14 Nov 2003 10:51:38 +0000 Subject: fix bug when enlarge the MAX_BOARDS git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1332 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 1 + 1 file changed, 1 insertion(+) 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++){ -- cgit v1.2.3