Commit bef947b4 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18902 Uninitialized variable in recv_parse_log_recs()

recv_parse_log_recs(): Do not compare type if ptr==end_ptr
(we have reached the end of the redo log parsing buffer),
because it will not have been correctly initialized in that case.
parent e070cfe3
...@@ -2697,16 +2697,20 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply) ...@@ -2697,16 +2697,20 @@ bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
&type, ptr, end_ptr, &space, &page_no, &type, ptr, end_ptr, &space, &page_no,
false, &body); false, &body);
if (recv_sys->found_corrupt_log if (recv_sys->found_corrupt_log) {
|| type == MLOG_CHECKPOINT corrupted_log:
|| (ptr != end_ptr
&& (*ptr & MLOG_SINGLE_REC_FLAG))) {
recv_sys->found_corrupt_log = true;
recv_report_corrupt_log( recv_report_corrupt_log(
ptr, type, space, page_no); ptr, type, space, page_no);
return(true); return(true);
} }
if (ptr == end_ptr) {
} else if (type == MLOG_CHECKPOINT
|| (*ptr & MLOG_SINGLE_REC_FLAG)) {
recv_sys->found_corrupt_log = true;
goto corrupted_log;
}
if (recv_sys->found_corrupt_fs) { if (recv_sys->found_corrupt_fs) {
return(true); return(true);
} }
......
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