From 23c4e648e3d38336f949498d0b93e5b399087e44 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 11 May 2008 12:37:34 -0700 Subject: Fixed NULL point dereference in "account set -del" code. --- root_commands.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 4b27afe3..f55c4b5e 100644 --- a/root_commands.c +++ b/root_commands.c @@ -422,6 +422,12 @@ static void cmd_account( irc_t *irc, char **cmd ) else acc_handle = g_strdup( cmd[2] ); + if( !acc_handle ) + { + irc_usermsg( irc, "Not enough parameters given (need %d)", 3 ); + return; + } + if( ( tmp = strchr( acc_handle, '/' ) ) ) { *tmp = 0; -- cgit v1.2.3