From: Matthew Nicholson Date: Thu, 16 Sep 2010 20:04:46 +0000 (+0000) Subject: Don't limit hint processing in ast_hint_state_changed() to AST_MAX_EXTENSION length... X-Git-Tag: 1.4.37-rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18e10794d978eea8d83bb668ed4567454fdea4b2;p=thirdparty%2Fasterisk.git Don't limit hint processing in ast_hint_state_changed() to AST_MAX_EXTENSION length strings. (closes issue #17928) Reported by: mdu113 Patches: 20100831__issue17928.diff.txt uploaded by tilghman (license 14) Tested by: mdu113 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@287118 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index e88bdb879f..67d4ac71a9 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -2017,12 +2017,10 @@ void ast_hint_state_changed(const char *device) AST_LIST_TRAVERSE(&hints, hint, list) { struct ast_state_cb *cblist; - char buf[AST_MAX_EXTENSION]; - char *parse = buf; + char *parse = ast_strdupa(ast_get_extension_app(hint->exten)); char *cur; int state; - ast_copy_string(buf, ast_get_extension_app(hint->exten), sizeof(buf)); while ( (cur = strsep(&parse, "&")) ) { if (!strcasecmp(cur, device)) break;