Skip to content

Commit d3e0eb5

Browse files
Add bug-detect logic for #202
Found by: Arkadietz Patch by: michaelortmann
1 parent a7eb74d commit d3e0eb5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/mod/irc.mod/irc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,16 @@ static void refresh_who_chan(char *channame)
296296
static void newmask(masklist *m, char *s, char *who)
297297
{
298298
for (; m && m->mask[0] && rfc_casecmp(m->mask, s); m = m->next);
299+
if (!m) {
300+
putlog(LOG_MISC, "*", "BUG!! newmask(): m == NULL.\n"
301+
" This is a known bug we haven't fixed yet. If this\n"
302+
" bot is the newest eggdrop version available and you\n"
303+
" know a *reliable* way to reproduce the bug, please\n"
304+
" contact us - we need your help!\n");
305+
return;
306+
}
299307
if (m->mask[0])
300308
return; /* Already existent mask */
301-
302309
m->next = (masklist *) channel_malloc(sizeof(masklist));
303310
m->next->next = NULL;
304311
m->next->mask = (char *) channel_malloc(1);

0 commit comments

Comments
 (0)