From b4575723852ba85feb165c18577d91bc7a94065a Mon Sep 17 00:00:00 2001 From: "iggy@rolltop.ignatz42.dyndns.org" <> Date: Thu, 30 Nov 2006 21:04:02 -0500 Subject: [PATCH] Bug#17951: myisampack --force --silent : abnormal end in Windows XP -myisampack wrote to a block on the heap that it did not allocate. --- myisam/myisampack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/myisam/myisampack.c b/myisam/myisampack.c index e80a3ffacd9..4582044009f 100644 --- a/myisam/myisampack.c +++ b/myisam/myisampack.c @@ -2922,6 +2922,8 @@ static void flush_bits(void) bits-= 8; *file_buffer.pos++= (uchar) (bit_buffer >> bits); } + if (file_buffer.pos >= file_buffer.end) + VOID(flush_buffer(~ (ulong) 0)); file_buffer.bits= BITS_SAVED; file_buffer.bitbucket= 0; }