mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
net_wins.c (WINS_GetLocalAddress): Make sure buff is null terminated.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@226 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
506774e2ad
commit
bfe38b58b4
1 changed files with 1 additions and 0 deletions
|
@ -80,6 +80,7 @@ static void WINS_GetLocalAddress (void)
|
||||||
if (gethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
|
if (gethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
buff[MAXHOSTNAMELEN - 1] = 0;
|
||||||
blocktime = Sys_FloatTime();
|
blocktime = Sys_FloatTime();
|
||||||
WSASetBlockingHook(BlockingHook);
|
WSASetBlockingHook(BlockingHook);
|
||||||
local = gethostbyname(buff);
|
local = gethostbyname(buff);
|
||||||
|
|
Loading…
Reference in a new issue