Fix buffer underflow when querying invalid nodes

This commit is contained in:
Gustaf Alhäll authored and Alug committed 2025-10-29 16:00:20 +01:00
1 parent 4ab139f2a2
commit e1ba0a8a6f
1 file changed
+1 -1
+1 -1
View File
@@ -752,7 +752,7 @@ static void SOCK_Send(void)
int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once
size_t i, j;
if (!nodeconnected[doomcom->remotenode])
if (doomcom->remotenode < 0 || !nodeconnected[doomcom->remotenode])
return;
if (doomcom->remotenode == BROADCASTADDR)