Ensure NULL terminator for VS2005 and below
parent
e227ddd09a
commit
1e3878751b
|
|
@ -81,6 +81,7 @@ int inet_pton(int af, const char *src, void *dst)
|
||||||
#else
|
#else
|
||||||
char temp[MAX_ADDRSTRLEN];
|
char temp[MAX_ADDRSTRLEN];
|
||||||
strncpy(temp, src, sizeof(temp));
|
strncpy(temp, src, sizeof(temp));
|
||||||
|
temp[MAX_ADDRSTRLEN-1] = '\0';
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue