Coverity CID 468110/468131 - fix newly detected error

THe previous commit unmasked another potential error in Coverity,
which is addressed by tightening up return value restrictions.
This commit is contained in:
matt335672
2025-02-03 10:23:02 +00:00
parent 2d2934241c
commit c122e0563d
+1 -1
View File
@@ -275,7 +275,7 @@ main_loop(char *local_port, char *remote_ip, char *remote_port, int hexdump)
g_tcp_socket_ok(con_sck);
}
}
else if (i < 1)
else if (i < 1 || i > (count - sent))
{
error = 1;
}