From 9caecc93487e15f67cc240bba972f8b9152cca4a Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Wed, 23 Aug 2017 21:14:29 +0100 Subject: [PATCH] rb_inet_pton_sock: initialise sockaddr to zero --- librb/src/commio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/librb/src/commio.c b/librb/src/commio.c index a131b7eb..2b3f07e0 100644 --- a/librb/src/commio.c +++ b/librb/src/commio.c @@ -1307,6 +1307,7 @@ inet_ntop6(const unsigned char *src, char *dst, unsigned int size) int rb_inet_pton_sock(const char *src, struct sockaddr *dst) { + memset(dst, 0, sizeof(*dst)); if(rb_inet_pton(AF_INET, src, &((struct sockaddr_in *)dst)->sin_addr)) { SET_SS_FAMILY(dst, AF_INET);