From e0c46a9c9a26c9e94914211d2fb25a2204a50bce Mon Sep 17 00:00:00 2001 From: Esa Korhonen Date: Fri, 12 Oct 2018 17:25:02 +0300 Subject: [PATCH] Initialize server version string Could read uninitialized data. --- server/core/server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/server.cc b/server/core/server.cc index 5918117a1..eb5805585 100644 --- a/server/core/server.cc +++ b/server/core/server.cc @@ -173,7 +173,7 @@ SERVER* server_alloc(const char* name, MXS_CONFIG_PARAMETER* params) server->triggered_at = 0; server->status = SERVER_RUNNING; server->maint_request = MAINTENANCE_NO_CHANGE; - server->version_string[0] = '\0'; + memset(server->version_string, '\0', MAX_SERVER_VERSION_LEN); server->version = 0; server->server_type = SERVER_TYPE_MARIADB; server->node_id = -1;