Skip to content

Commit cd4d3f1

Browse files
author
Philip Kaufmann
committed
Win32: change buffer size for gethotsname in Discover()
- 256 byte is the maximum, as per http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx
1 parent 8fa0494 commit cd4d3f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ void static Discover(boost::thread_group& threadGroup)
15591559

15601560
#ifdef WIN32
15611561
// Get local host IP
1562-
char pszHostName[1000] = "";
1562+
char pszHostName[256] = "";
15631563
if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
15641564
{
15651565
vector<CNetAddr> vaddr;

0 commit comments

Comments
 (0)