Actually, this shouldn't fix it, and moreover, is probably the wrong approch anyway:
The reason why it shouldn't fix it, is that we already handle any EOF exceptions that might result from trying to read a too long string (it's handled in CClientTCPSocket::PacketReceived where ProcessPacket is called from). Hence, no crash should result, suggesting that the problem lies elsewhere. CMemFile::doRead itself does not permit readings beyond its buffer, happily or not, and if it does happen, then it's CMemFile that should be fixed.
And as we now have no idea if the client sent a (possibly) corrupted message packet, we now cannot do the appropriate thing. In fact, given that the package is corrupted, we might even display an invalid string (making me wonder why we have "SafeRead" in the first place).
So I would vote for reverting that commit. If that was the cause, then amule should display an appropriate message on the console ("Terminated after throwing an instance of ..."), due to the unhandled exception, and I would ask Excalibre to try running aMule from a console and checking for any such error-messages.
sturedman, if you have a backtrace, please post it.
