From 109a363733cb4262420de17d08ea0170539fc7fa Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Mon, 17 May 2010 21:48:46 +0000 Subject: [PATCH] Remove arbitrary size limitation for hints. (closes issue #17257) Reported by: tim_ringenbach Patches: hints_crash_fix.diff uploaded by tim ringenbach (license 540) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@263637 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/pbx.c b/main/pbx.c index 928c7bf90f..6ec070be44 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1960,7 +1960,7 @@ enum ast_extension_states ast_devstate_to_extenstate(enum ast_device_state devst /*! \brief ast_extensions_state2: Check state of extension by using hints */ static int ast_extension_state2(struct ast_exten *e) { - char hint[AST_MAX_EXTENSION]; + char *hint; char *cur, *rest; struct ast_devstate_aggregate agg; @@ -1969,7 +1969,7 @@ static int ast_extension_state2(struct ast_exten *e) if (!e) return -1; - ast_copy_string(hint, ast_get_extension_app(e), sizeof(hint)); + hint = ast_strdupa(ast_get_extension_app(e)); rest = hint; /* One or more devices separated with a & character */ while ( (cur = strsep(&rest, "&")) ) { -- 2.47.3