diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-05-11 12:37:34 -0700 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-05-11 12:37:34 -0700 | 
| commit | 23c4e648e3d38336f949498d0b93e5b399087e44 (patch) | |
| tree | 4a03944c1e7c765798e363e1c7dd9d97b776e443 /root_commands.c | |
| parent | 99f929cb5faca663969361e4a142d0c309af1725 (diff) | |
Fixed NULL point dereference in "account set -del" code.
Diffstat (limited to 'root_commands.c')
| -rw-r--r-- | root_commands.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| 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; | 
