diff options
-rw-r--r-- | include/config.h | 2 | ||||
-rw-r--r-- | mbbsd/brc.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/config.h b/include/config.h index 9cf75555..628f30f0 100644 --- a/include/config.h +++ b/include/config.h @@ -264,7 +264,7 @@ #define MAXTAGS 256 #define BRC_STRLEN 15 /* Length of board name */ -#define BRC_MAXSIZE 24576 +#define BRC_MAXSIZE 49152 #define BRC_MAXNUM 80 #define WRAPMARGIN (511) diff --git a/mbbsd/brc.c b/mbbsd/brc.c index 7d35018c..74346a5c 100644 --- a/mbbsd/brc.c +++ b/mbbsd/brc.c @@ -7,6 +7,7 @@ * original time_t as 'create'. */ +// WARNING: Check ../include/config.h, you may have overide these value there #ifndef BRC_MAXNUM #define BRC_STRLEN 15 /* Length of board name, for old brc */ #define BRC_MAXSIZE 49152 /* Effective size of brc rc file, 8192 * 3 * 2 */ @@ -253,7 +254,7 @@ brc_update(){ } } -static void +void read_brc2(void) { char brcfile[STRLEN]; @@ -304,6 +305,9 @@ read_brc2(void) // now cvthead is ready for v3. sz3 = cvt - cvthead; brc_get_buf(sz3); + // new size maybe smaller, check brc_alloc instead + if (sz3 > brc_alloc) + sz3 = brc_alloc; brc_size = sz3; memcpy(brc_buf, cvthead, sz3); |