Commit 4b23d551 authored by marko's avatar marko

branches/zip: page_zip_compress(): Do not call deflate(&c_stream, Z_FULL_FLUSH)

unless more than 6 bytes are available for the output.  This should remove
the possibility that deflate() returns Z_OK without consuming all input.
parent a8635f7e
......@@ -1142,7 +1142,8 @@ page_zip_compress(
trx_id_col = ULINT_UNDEFINED;
}
if (UNIV_UNLIKELY(c_stream.avail_out < n_dense * slot_size)) {
if (UNIV_UNLIKELY(c_stream.avail_out <= n_dense * slot_size
+ 6/* sizeof(zlib header and footer) */)) {
goto zlib_error;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment