[CRIU] [PATCH 10/16] sk-unix: Zeorify address for AF_UNSPEC

Cyrill Gorcunov gorcunov at openvz.org
Fri Dec 9 09:17:10 PST 2016


Actually the kernel treats AF_UNSPEC in a special
and passing here trash won't hurt for now but better
to be on a safe side.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/sk-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index 6ce5427985df..7f4a3bf68c0b 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1204,7 +1204,7 @@ static int open_unixsk_standalone(struct unix_sk_info *ui)
 		close(sks[1]);
 		sk = sks[0];
 	} else if (ui->ue->type == SOCK_DGRAM && !ui->queuer) {
-		struct sockaddr_un addr;
+		struct sockaddr_un addr = { };
 		int sks[2];
 
 		if (socketpair(PF_UNIX, ui->ue->type, 0, sks) < 0) {
-- 
2.7.4



More information about the CRIU mailing list