From 1e3878751b3683d6a99ae00229ab7a85b2613ade Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 10 Oct 2016 15:57:21 -0400 Subject: [PATCH] Ensure NULL terminator for VS2005 and below --- socketft.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/socketft.cpp b/socketft.cpp index 33adf06a..eda6b2ed 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -81,6 +81,7 @@ int inet_pton(int af, const char *src, void *dst) #else char temp[MAX_ADDRSTRLEN]; strncpy(temp, src, sizeof(temp)); + temp[MAX_ADDRSTRLEN-1] = '\0'; #endif