From fea6157df04fee33a8ca55537e7c473adde4b154 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 3 Mar 2014 00:01:56 +0100 Subject: [PATCH] Avoid possible null dereference. --- modules/core/m_mode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/m_mode.c b/modules/core/m_mode.c index 87be36c9..f8fee2ec 100644 --- a/modules/core/m_mode.c +++ b/modules/core/m_mode.c @@ -376,8 +376,10 @@ ms_bmask(struct Client *client_p, struct Client *source_p, int parc, const char *forward++ = '\0'; if(*forward == '\0') tlen--, forward = NULL; - possibly_remove_lower_forward(fakesource_p, mems, - chptr, banlist, parv[3][0], s, forward); + else + possibly_remove_lower_forward(fakesource_p, + mems, chptr, banlist, + parv[3][0], s, forward); } if(add_id(fakesource_p, chptr, s, forward, banlist, mode_type))