eina debug - ensure sockaddr is 0'd out before filling in to avoid junk

valgrind does complain about this. i'm not sure it matters but it's
safer to 0 it out in case some field is being used that we don't think
is being used that we didn't set.
This commit is contained in:
Carsten Haitzler 2017-10-29 11:19:48 +09:00
parent 9de26c37a1
commit 31f8c6f17e
1 changed files with 1 additions and 0 deletions

View File

@ -514,6 +514,7 @@ eina_debug_local_connect(Eina_Bool is_master)
sizeof(curstate)) < 0)
goto err;
// sa that it's a unix socket and where the path is
memset(&socket_unix, 0, sizeof(socket_unix));
socket_unix.sun_family = AF_UNIX;
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path) - 1);
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);