diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/brc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/brc.c b/mbbsd/brc.c index 7ba1f40e..b3be8101 100644 --- a/mbbsd/brc.c +++ b/mbbsd/brc.c @@ -130,9 +130,10 @@ brc_putrecord(char *ptr, char *endp, brcbid_t bid, brcnbrd_t num, const time_t * static inline int brc_enlarge_buf() { - char buffer[BRC_MAXSIZE - BRC_BLOCKSIZE]; + char *buffer; if (brc_alloc >= BRC_MAXSIZE) return 0; + buffer = (char*)alloca(brc_alloc); memcpy(buffer, brc_buf, brc_alloc); free(brc_buf); brc_alloc += BRC_BLOCKSIZE; |