.NET Sockets Buffer Overflow No Error
- by Michael Covelli
I have one thread that is receiving data over a socket like this:
while (sock.Connected)
{
// Receive Data (Block if no data)
recvn = sock.Receive(recvb, 0, rlen, SocketFlags.None, out serr);
if (recvn <= 0 || sock == null || !sock.Connected)
{
OnError("Error In Receive, recvn <= 0 || sock == null ||…