in libircclient.c line 622;
else if \( \!strccmp \(params\[0\], session->nick\) \)
This needs to be strcasecmp; nicks and channels are case preserving but case insensitive.
Actually, I have a bunch of suggested fixes in this area. I'll supply a patch and you can review & merge if acceptable.
Sure. BTW, wanna join as a maintainer?
the attached patch does the following;
in libirc_process_incoming_data(), use size_t for process_length. A length < 0 isn't valid; and size_t should really be used for all lengths as a matter of consistency.
Added char *buf_end which points to buf + process_length, giving us a way to limit the strncmp() calls.
Replaced all usage of strcmp() with strncmp().
Replaced the problematic strcmp() in the nickname comparison on line 622 with strncasecmp() (is this available on every OS? or is it a BSD thing?)
It also includes the fix for the ACTION target clobbering issue.
You can add me as maintainer if you like; but I probably won't be very active. You also may not agree with my fixes :)
Generally it's ok. I'd replace strncasecmp by your own function as it's not portable enough. Should be easy to do so.
I've added you as a developer. The library is generally stable, so bugfixes are quite rare. I do not use personally this library anymore, and therefore not adding the features. Feel free to discuss/add new ones. For coding, I would ask the code to support Unix/Win32 which shouldn't be a problem.
Fixed in revision 82.
\#define strncasecmp \_strnicmp
to portable.c which should make it work on Windows.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.