mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: network: do not read from uninitialized sockaddr storage
This commit is contained in:
parent
be084d5603
commit
4f78ec01cf
@ -1451,10 +1451,10 @@ static qboolean NET_QueuePacket( netsrc_t sock, netadr_t *from, byte *data, size
|
|||||||
addr_len = sizeof( addr );
|
addr_len = sizeof( addr );
|
||||||
ret = recvfrom( net_socket, buf, sizeof( buf ), 0, (struct sockaddr *)&addr, &addr_len );
|
ret = recvfrom( net_socket, buf, sizeof( buf ), 0, (struct sockaddr *)&addr, &addr_len );
|
||||||
|
|
||||||
NET_SockadrToNetadr( &addr, from );
|
|
||||||
|
|
||||||
if( !NET_IsSocketError( ret ))
|
if( !NET_IsSocketError( ret ))
|
||||||
{
|
{
|
||||||
|
NET_SockadrToNetadr( &addr, from );
|
||||||
|
|
||||||
if( ret < NET_MAX_FRAGMENT )
|
if( ret < NET_MAX_FRAGMENT )
|
||||||
{
|
{
|
||||||
// Transfer data
|
// Transfer data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user