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.
This commit is contained in:
Haidong Ji 2022-02-20 21:46:37 -06:00 committed by Daniel Black
parent 4030a9fb2e
commit 120480d15b

View File

@ -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
{