From 4e99e282b9446667abaa98727d738efe8df1821e Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 19 Apr 2014 11:28:15 +1000 Subject: [PATCH] Pass correct size for bind and connect --- src/libckpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libckpool.c b/src/libckpool.c index c60762b4..ac14fc1b 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -554,7 +554,7 @@ int open_unix_server(const char *server_path) serveraddr.sun_family = AF_UNIX; strcpy(serveraddr.sun_path, server_path); - ret = bind(sockd, (struct sockaddr *)&serveraddr, sizeof(&serveraddr)); + ret = bind(sockd, (struct sockaddr *)&serveraddr, sizeof(serveraddr)); if (unlikely(ret < 0)) { LOGERR("Failed to bind to socket in open_unix_server"); close_unix_socket(sockd, server_path); @@ -600,7 +600,7 @@ int open_unix_client(const char *server_path) serveraddr.sun_family = AF_UNIX; strcpy(serveraddr.sun_path, server_path); - ret = connect(sockd, (struct sockaddr *)&serveraddr, sizeof(&serveraddr)); + ret = connect(sockd, (struct sockaddr *)&serveraddr, sizeof(serveraddr)); if (unlikely(ret < 0)) { LOGERR("Failed to bind to socket in open_unix_client"); close(sockd);