Hi all!
IMHO aMule should handle malformed incoming packages gracefully instead of calling wxFail. AIUI, the latter is meant for debugging the OWN code, i.e. to be placed where program control should never arrive in principle.
As already pointed out elsewhere (
http://forum.amule.org/index.php?topic=21316.0), I'm talking about the functions CUpDownClient::ProcessPublicKeyPacket() and CUpDownClient::ProcessSignaturePacket() in BaseClient.cpp. Both "fail" (in the sense of calling wxFail) upon receiving oversized packets (i.e. >250) in protocol OP_EMULEPROT.
But obviously, there are clients out there (albeit very few), which do send such oversized packets. Actually, it turns out to be the same buggy/malicious/extended client (couldn't identify it, yet) sending OP_PUBLICKEY with size 421 and OP_SIGNATURE of size 385.
It seems to me that both mentioned functions could simply return in those cases. Any opinion from the experts?