From b0a1aacd4b726d59a3e70e3b78223106667163a5 Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Sun, 25 Oct 2020 14:15:52 +0100 Subject: [PATCH] pknlusr: use macro to define inet_ntop buffer size POSIX provides a macro to define the minimum length required, so let's use it. Signed-off-by: Jeremy Sowden --- extensions/pknock/pknlusr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/pknock/pknlusr.c b/extensions/pknock/pknlusr.c index 6fe1d4a..16a9af9 100644 --- a/extensions/pknock/pknlusr.c +++ b/extensions/pknock/pknlusr.c @@ -47,7 +47,7 @@ int main(void) while(1) { const char *ip; - char ipbuf[48]; + char ipbuf[INET_ADDRSTRLEN]; memset(nlmsg, 0, nlmsg_size); status = recv(sock_fd, nlmsg, nlmsg_size, 0); -- 2.47.2