From d5a3c053167eaee499447063a670735b3590d6fa Mon Sep 17 00:00:00 2001 From: pk910 Date: Tue, 27 Aug 2013 22:20:45 +0200 Subject: [PATCH] fixed variable scope issue in modcmd.c:svccmd_invoke_argv local (block only) variable new_argv is not persistent outside of the if block on line 724! --- src/modcmd.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modcmd.c b/src/modcmd.c index a8e123a..25a3fd3 100644 --- a/src/modcmd.c +++ b/src/modcmd.c @@ -721,10 +721,14 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo /* Expand the alias arguments, if there are any. */ if (cmd->alias.used) { - char *new_argv[MAXNUMPARAMS]; + char *old_argv[MAXNUMPARAMS]; int res; + unsigned int nn; + + for(nn=0;nnbot, "MSG_MISSING_PARAMS", cmd->name); return 0; @@ -733,7 +737,6 @@ svccmd_invoke_argv(struct userNode *user, struct service *service, struct chanNo return 0; } argc = res; - argv = new_argv; /* Try again to grab a handle to the channel after alias * expansion, overwriting any previous channel. This should, -- 2.20.1