[dcc2] Reducing the size of the DCC2 negotiation message

codemastr codemstr at ptd.net
Mon May 10 15:16:21 EDT 2004


> If it was me creating tokens, I would create ALL token names and ALL text
> based token parameters as 4 bytes long.
In my mind, this is just asking for more exploits. You need to correctly
handle the instances where a malicious user specifies < 4 bytes, > 4 bytes,
etc. And if you don't, well it's real easy to crash someones IRC client.

I would say, stay away from such hacks. Not to mention, even in C this gains
almost no speed. The strcmp functions are often written in optimized
assembler code. They make sure to take advantage of the CPUs features such
as multiple pipes. Therefore, it's possible that doing as you suggested
could in fact make it slower! Unlikely, but possible.

-- codemastr




More information about the dcc2 mailing list