summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-10-29 11:19:48 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-10-29 11:19:48 +0900
commit31f8c6f17e1b62ecdc95f3bd0a51dcd7552419d5 (patch)
tree03ef31d16ef510026d86d97638308873b409d78f
parent9de26c37a13cf9bc672e97b73662f366ed18ca97 (diff)
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.
-rw-r--r--src/lib/eina/eina_debug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c
index c72f495a83..c3b1a24ab2 100644
--- a/src/lib/eina/eina_debug.c
+++ b/src/lib/eina/eina_debug.c
@@ -514,6 +514,7 @@ eina_debug_local_connect(Eina_Bool is_master)
514 sizeof(curstate)) < 0) 514 sizeof(curstate)) < 0)
515 goto err; 515 goto err;
516 // sa that it's a unix socket and where the path is 516 // sa that it's a unix socket and where the path is
517 memset(&socket_unix, 0, sizeof(socket_unix));
517 socket_unix.sun_family = AF_UNIX; 518 socket_unix.sun_family = AF_UNIX;
518 strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path) - 1); 519 strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path) - 1);
519 socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix); 520 socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);