From 05ed272c1627b21ff623b7fdf5a60f2ba2f4f5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 27 May 2019 03:23:27 +0300 Subject: [PATCH] Fix format-truncation warnings in blr The custom message must be smaller than the actual message to guarantee no truncation takes place. --- server/modules/routing/binlogrouter/blr_slave.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/binlogrouter/blr_slave.cc b/server/modules/routing/binlogrouter/blr_slave.cc index 8a008184d..2525ed6c2 100644 --- a/server/modules/routing/binlogrouter/blr_slave.cc +++ b/server/modules/routing/binlogrouter/blr_slave.cc @@ -4286,7 +4286,7 @@ int validate_connection_name(ROUTER_INSTANCE* router, const std::string& name, c int index = -1; - char custom_message[BINLOG_ERROR_MSG_LEN + 1]; + char custom_message[BINLOG_ERROR_MSG_LEN]; const char* message = DEFAULT_MESSAGE;