IRC correctness checks

Tomasz Wasilczyk tomasz at wasilczyk.pl
Wed Jan 15 20:20:20 EST 2014


W dniu 15.01.2014 03:57, Ethan Blanton pisze:
> if (!args || !args[0] || !args[1])
>      return;

I've implemented the new "feature" for parser (and committed to private 
repo). But when I started figuring out the required parameter counts, I 
realized that in most (every?) cases we need a PurpleConnection object, 
so msgs.c has a lot of checks for gc being not NULL.

Can I safely assume, that (gc != NULL) is required for *all* IRC 
messages, to get rid of these checks? Also, to simplify the code a bit, 
PurpleConnection object could be passed to the callback, just like 
irc_conn struct is.

Moreover, I'm not sure if PURPLE_CONNECTION_IS_CONNECTED shouldn't be 
checked also.

Tomek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4222 bytes
Desc: Kryptograficzna sygnatura S/MIME
URL: <https://pidgin.im/cgi-bin/mailman/private/security/attachments/20140116/01628a4c/attachment-0001.bin>


More information about the security mailing list