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
|
||||
char temp[MAX_ADDRSTRLEN];
|
||||
strncpy(temp, src, sizeof(temp));
|
||||
temp[MAX_ADDRSTRLEN-1] = '\0';
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue