summaryrefslogtreecommitdiff
path: root/myisam/myisampack.c
diff options
context:
space:
mode:
authorunknown <iggy@rolltop.ignatz42.dyndns.org>2006-11-30 21:04:02 -0500
committerunknown <iggy@rolltop.ignatz42.dyndns.org>2006-11-30 21:04:02 -0500
commit8a223884b97880100fcb683749fb8dc7f955d8a2 (patch)
treedcf443085a488efbe34299154f8d677d1cc180c5 /myisam/myisampack.c
parentc838a52ff35f4327c63faa6f96de35684ab71cac (diff)
downloadmariadb-git-8a223884b97880100fcb683749fb8dc7f955d8a2.tar.gz
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: Bug#17951: myisampack --force --silent : abnormal end in Windows XP -Added additional check to ensure that only the allocated buffer is used.
Diffstat (limited to 'myisam/myisampack.c')
-rw-r--r--myisam/myisampack.c2
1 files changed, 2 insertions, 0 deletions
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;
}