[srvx-bugs] [ srvx-Bugs-2964781 ] latests changes to ?chaninfo can cause a crash
Brought to you by:
entrope
From: SourceForge.net <no...@so...> - 2010-03-06 18:02:03
|
Bugs item #2964781, was opened at 2010-03-06 19:02 Message generated for change (Tracker Item Submitted) made by zerofighte You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403001&aid=2964781&group_id=31654 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Miscellaneous Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: ZeRoFiGhter (zerofighte) Assigned to: Nobody/Anonymous (nobody) Summary: latests changes to ?chaninfo can cause a crash Initial Comment: hi, if you call ?chaninfo for an empty +z channel (csuspended chans could be empty when all real users are gone) the cmd_chaninfo function gets info from the first (array index [0]) user to determine wether to send oplevels or not. This is illegal for these empty chans. a solution would be: (omitting whitespaces for better readability, for sure with some line-offset) Index: src/opserv.c =================================================================== --- src/opserv.c (Revision 303) +++ src/opserv.c (Revision 304) @@ -506,6 +506,9 @@ } reply("OSMSG_CHANINFO_USER_COUNT", channel->members.used); + /* If there are people in the chan */ + if (channel->members.used) + { /* Create and sort the members array. */ members = alloca(channel->members.used * sizeof(members[0])); for (n=0; n<channel->members.used; n++) @@ -526,6 +529,7 @@ else send_message_type(4, user, cmd->parent->bot, " %s (%s@%s)", moden->user->nick, moden->user->ident, moden->user->hostname); } + } return 1; } again srvx 1.4 latest git regards ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403001&aid=2964781&group_id=31654 |