[PATCH xtables-addons v2 06/13] pknock: pknlusr: use macro to define inet_ntop buffer size.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



POSIX provides a macro to define the minimum length required, so let's
use it.

Signed-off-by: Jeremy Sowden <jeremy@xxxxxxxxxx>
---
 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 252fd42ffecd..9f11250510a1 100644
--- a/extensions/pknock/pknlusr.c
+++ b/extensions/pknock/pknlusr.c
@@ -53,7 +53,7 @@ int main(void)
 	while(1) {
 
 		const char *ip;
-		char ipbuf[48];
+		char ipbuf[INET_ADDRSTRLEN];
 
 		memset(nlmsg, 0, nlmsg_size);
 
-- 
2.28.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux