-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
channel modes +Q make kill the ircd proccess #26
Comments
Strictly speaking, if the QUIT/PART message is empty (NULL) then HasColor() should never be called to begin with. So the solution would be to prevent HasColor() being called. Seeing as the current code currently does not allow a NULL pointer (0x0) to be passed to HasColor() from m_part.c and m_quit.c (the only places channel mode +Q affects the use of HasColor()) I am going to have to ask you for the FULL back trace for the crash please. And can you also tell me what exact revision of Nefarious 2 you are using please? For example in m_part.c HasColor() is used as such (note the addtion of parts.jb_comment on its own to verify that it is a non-zero value and thus would not allow the back trace info you already provided to fit): And in m_quit.c HasColor() is used (where one of the checks BadPrt() does is to ensure parv[parc - 1] is non-zero): |
i am using nefarious2 not the "-master" revision_with few changes/m_topic.c was haveing the same problem with colors but i saw in "-master" that you already fixed_ .... well the problem there that the quit/part "text" in hascolor ircd_string.c the other channel modes /notice/color/ctcp/ works fine.. |
ohh and another one :) /mode channel +o nickname after the user gets @/op and i repeat the command , will always showing that i give @/op to that user even if the user is already opped. |
ALLOW_OPLEVEL_CHANGE = FALSE and you will be fine ;) |
Closing as I am unable to replicate.or even work out how the explanation even lead to the crash in question. |
+Q Strip QUIT/PART messages */ <-- when i set this channel mode on a channel and i part the channel with a message the ircd proccess is killed SIG_SERV error !!!
"CHMODE_Q" = "TRUE"; <-- ircd.conf line !!!
problem solved !!!
Program received signal SIGSEGV, Segmentation fault.
HasColor (text=0x0) at ircd_string.c:756
756 for (tmp = text; (*tmp); tmp++) {
#0 HasColor (text=0x0) at ircd_string.c:756
fixed by adding
if (text != NULL) { }
the code looks like this:
int HasColor(const char* text)
{
const char _tmp;
if (text != NULL) {
for (tmp = text; (_tmp); tmp++) {
if (_tmp & 224) continue;
switch (_tmp) {
case COLOR_BOLD:
case COLOR_REVERSE:
case COLOR_UNDERLINE:
case COLOR_ITALIC:
case COLOR_NORMAL:
case COLOR_COLOR:
return 1;
default:;
}
}
}
return 0;
}
The text was updated successfully, but these errors were encountered: