Commit fe5213b3 authored by marko's avatar marko

branches/zip: Tighten the assertions about page_zip->m_end.

parent 0a5b956f
...@@ -1851,7 +1851,8 @@ page_zip_decompress( ...@@ -1851,7 +1851,8 @@ page_zip_decompress(
goto err_exit; goto err_exit;
} }
page_zip->m_end = mod_log_ptr - page_zip->data; page_zip->m_end = mod_log_ptr - page_zip->data;
ut_ad(page_zip->m_end < page_zip->size); ut_ad(page_zip_get_trailer_len(page_zip, index, NULL)
+ page_zip->m_end < page_zip->size);
} }
if (UNIV_UNLIKELY(!page_zip_set_extra_bytes( if (UNIV_UNLIKELY(!page_zip_set_extra_bytes(
...@@ -3128,7 +3129,8 @@ page_zip_copy( ...@@ -3128,7 +3129,8 @@ page_zip_copy(
page_zip->n_blobs = src_zip->n_blobs; page_zip->n_blobs = src_zip->n_blobs;
page_zip->m_start = src_zip->m_start; page_zip->m_start = src_zip->m_start;
page_zip->m_end = src_zip->m_end; page_zip->m_end = src_zip->m_end;
ut_ad(page_zip->m_end < page_zip->size); ut_ad(page_zip_get_trailer_len(page_zip, index, NULL)
+ page_zip->m_end < page_zip->size);
if (!page_is_leaf(src) if (!page_is_leaf(src)
&& UNIV_UNLIKELY(mach_read_from_4((byte*) src && UNIV_UNLIKELY(mach_read_from_4((byte*) src
......
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