]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Remove arbitrary size limitation for hints.
authorMark Michelson <mmichelson@digium.com>
Mon, 17 May 2010 21:48:46 +0000 (21:48 +0000)
committerMark Michelson <mmichelson@digium.com>
Mon, 17 May 2010 21:48:46 +0000 (21:48 +0000)
(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

index 928c7bf90f955984db57dcc6666a7cd0c64b14f1..6ec070be440ba1b910bf7ca07c55c5e0eed845d0 100644 (file)
@@ -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, "&")) ) {