From 3a1828ec2ad86c4099815031d586012243d7acec Mon Sep 17 00:00:00 2001 From: Jeremy Lakeman Date: Fri, 31 Oct 2014 13:43:50 +1030 Subject: [PATCH] Don't force the caller to initialise the address buffer length --- mdp_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdp_net.c b/mdp_net.c index fa3e5131..85389ada 100644 --- a/mdp_net.c +++ b/mdp_net.c @@ -29,7 +29,7 @@ ssize_t recvwithttl(int sock,unsigned char *buffer, size_t bufferlen,int *ttl, s iov[0].iov_len=bufferlen; bzero(&msg,sizeof(msg)); msg.msg_name = &recvaddr->store; - msg.msg_namelen = recvaddr->addrlen; + msg.msg_namelen = sizeof(recvaddr->store); msg.msg_iov = &iov[0]; msg.msg_iovlen = 1; msg.msg_control = cmsgcmsg;