summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-12-04 16:01:30 +0200
committerunknown <heikki@donna.mysql.fi>2001-12-04 16:01:30 +0200
commitd12413f6f60bec13d6cace42f7cb8d85eda9b998 (patch)
tree8cf194961037d865f64741820f540a4d65ce03cb
parent89b0b23464ddbaa47864e78fe944b4889cb68768 (diff)
downloadmariadb-git-d12413f6f60bec13d6cace42f7cb8d85eda9b998.tar.gz
log0recv.c:
Add fault tolerance: when a log record contains nonsensical space id or page number, stop log scan there innobase/log/log0recv.c: Add fault tolerance: when a log record contains nonsensical space id or page number, stop log scan there
-rw-r--r--innobase/log/log0recv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index 999429cbfcd..1734cfadfff 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -1316,7 +1316,9 @@ recv_parse_log_rec(
new_ptr = mlog_parse_initial_log_record(ptr, end_ptr, type, space,
page_no);
- if (!new_ptr) {
+ /* Check that space id and page_no are sensible */
+
+ if (!new_ptr || *space != 0 || *page_no > 0x8FFFFFFF) {
return(0);
}