From 120480d15b764d03d5d36fb68735a1975ceb3454 Mon Sep 17 00:00:00 2001 From: Haidong Ji Date: Sun, 20 Feb 2022 21:46:37 -0600 Subject: [PATCH] MDEV-27394 added memset to zero out addr.un.sun_path string If this char[] is not zeroed out, inaccurate log message described in MDEV-27394 will show up. --- sql/mysqld.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index d6d0885093d..b6748170942 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2474,6 +2474,7 @@ static void use_systemd_activated_sockets() addr.un.sun_path[0] = '@'; sql_print_information("Using systemd activated unix socket %s%s", addr.un.sun_path, sock.is_extra_port ? " (extra)" : ""); + memset(addr.un.sun_path, 0, sizeof(addr.un.sun_path)); } else {