diff --git a/apps/app_queue.c b/apps/app_queue.c index 71aa9e2d18..2fc317a64f 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -5488,7 +5488,7 @@ static int reload_queues(int reload) struct ao2_iterator mem_iter; int new; const char *general_val = NULL; - char parse[80]; + char *parse; char *interface, *state_interface; char *membername = NULL; int penalty; @@ -5607,7 +5607,9 @@ static int reload_queues(int reload) } /* Add a new member */ - ast_copy_string(parse, var->value, sizeof(parse)); + if (!(parse = ast_strdup(var->value))) { + continue; + } AST_STANDARD_APP_ARGS(args, parse); @@ -5652,6 +5654,7 @@ static int reload_queues(int reload) else { q->membercount++; } + ast_free(parse); } else { queue_set_param(q, var->name, var->value, var->lineno, 1); }