Skip to content

Commit c8cf8d3

Browse files
committed
MDEV-37104 Fix potential buffer overrun reported by the compiler.
net_store_length(buf, length) might need 9 bytes buffer for parameter length bigger than 16M.
1 parent 2c7cea2 commit c8cf8d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/log_event_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7124,7 +7124,7 @@ static inline
71247124
void store_compressed_length(String &str_buf, ulonglong length)
71257125
{
71267126
// Store Type and packed length
7127-
uchar buf[4];
7127+
uchar buf[9];
71287128
uchar *buf_ptr = net_store_length(buf, length);
71297129

71307130
str_buf.append(reinterpret_cast<char *>(buf), buf_ptr-buf);

0 commit comments

Comments
 (0)