summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 9eba7e0b4..280a0f3ca 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1565,13 +1565,15 @@ static void do_hang(struct callattempt *o)
static char *vars2manager(struct ast_channel *chan, char *vars, size_t len)
{
- char *tmp = alloca(len);
+ struct ast_str *buf = ast_str_alloca(len + 1);
+ char *tmp;
- if (pbx_builtin_serialize_variables(chan, tmp, len)) {
+ if (pbx_builtin_serialize_variables(chan, &buf)) {
int i, j;
/* convert "\n" to "\nVariable: " */
strcpy(vars, "Variable: ");
+ tmp = buf->str;
for (i = 0, j = 10; (i < len - 1) && (j < len - 1); i++, j++) {
vars[j] = tmp[i];