From e02903973a87f57fea804162a70888ad64003844 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Fri, 13 May 2016 16:07:59 +0200
Subject: [PATCH] fixup! libndp: validate the IPv6 hop limit

Actually allocate space for the hop limit.
---
 libndp/libndp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libndp/libndp.c b/libndp/libndp.c
index f817ad6..b7172fa 100644
--- a/libndp/libndp.c
+++ b/libndp/libndp.c
@@ -140,7 +140,7 @@ static int myrecvfrom6(int sockfd, void *buf, size_t *buflen, int flags,
 		       struct in6_addr *addr, uint32_t *ifindex, int *hoplimit)
 {
 	struct sockaddr_in6 sin6;
-	unsigned char cbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
+	unsigned char cbuf[2 * CMSG_SPACE(sizeof(struct in6_pktinfo))];
 	struct iovec iovec;
 	struct msghdr msghdr;
 	struct cmsghdr *cmsghdr;
-- 
2.5.5

