Post
by rmaxm » Sun Aug 02, 2015 6:49 pm
Looks to me like a minor pointer bug in TelnetServer.cpp when a connection is closing.
The code reads:
while(Conn->Received)
{
PCHATBUF rNext=Conn->Received->pNext;
free(rNext);
Conn->Received=rNext;
}
But this is going to free the next buffer (which will probably be NULL) instead of the current buffer.
Should be:
while(Conn->Received)
{
PCHATBUF rNext=Conn->Received->pNext;
free(Conn->Received);
Conn->Received=rNext;
}
This will of course be a very very rare condition.
(The same bug exists in CTelnetServer::Shutdown).
Also, I'm not sure this is the right place to post these kind of things so let me know if there is someplace else where devs post internal bugs like this.
And should I post a diff file?
Thanks,
RMAXM