Commit 2b2de7b6 authored by guilhem@mysql.com's avatar guilhem@mysql.com

In binary log events, flags are 2 bytes, not 4. Using 4 resulted in buffer...

In binary log events, flags are 2 bytes, not 4. Using 4 resulted in buffer overflow (and on a certain build it resulted in overwriting another part of the event without crashing :( ).
parent 8cd9fd44
...@@ -571,7 +571,7 @@ bool Log_event::write_header(IO_CACHE* file, ulong event_data_length) ...@@ -571,7 +571,7 @@ bool Log_event::write_header(IO_CACHE* file, ulong event_data_length)
int4store(header+ SERVER_ID_OFFSET, server_id); int4store(header+ SERVER_ID_OFFSET, server_id);
int4store(header+ EVENT_LEN_OFFSET, data_written); int4store(header+ EVENT_LEN_OFFSET, data_written);
int4store(header+ LOG_POS_OFFSET, log_pos); int4store(header+ LOG_POS_OFFSET, log_pos);
int4store(header+ FLAGS_OFFSET, flags); int2store(header+ FLAGS_OFFSET, flags);
DBUG_RETURN(my_b_safe_write(file, header, sizeof(header)) != 0); DBUG_RETURN(my_b_safe_write(file, header, sizeof(header)) != 0);
} }
......
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