Fixed infinite loop condition

This commit is contained in:
Tal Aloni 2017-02-20 21:13:25 +02:00
parent b3df4dd01c
commit 36ca529f79

View file

@ -188,9 +188,11 @@ namespace SMBLibrary.Server
{ {
packet = receiveBuffer.DequeuePacket(); packet = receiveBuffer.DequeuePacket();
} }
catch (Exception) catch (Exception ex)
{ {
state.ClientSocket.Close(); state.ClientSocket.Close();
Log(Severity.Warning, "Rejected Invalid NetBIOS session packet: " + ex.ToString());
break;
} }
if (packet != null) if (packet != null)