]> git.ipfire.org Git - thirdparty/asterisk.git/commit
app_macro: Prevent infinite loop in find_matching_priority.
authorCorey Farrell <git@cfware.com>
Fri, 4 May 2018 18:47:25 +0000 (14:47 -0400)
committerCorey Farrell <git@cfware.com>
Mon, 7 May 2018 13:58:12 +0000 (07:58 -0600)
commitd855658f23e07bcd2b5b300980435369a20a1acb
tree149426de45a5500eb84cbc6c6dbd1712c5ac708a
parent57ad488451a94db84a2394d4934c8858fba0c40c
app_macro: Prevent infinite loop in find_matching_priority.

Use AST_PBX_MAX_STACK to escape if we recurse 128 times.  This will
prevent crash if dialplan contains an include loop.  Log an error when
this occurs, at most one message per call to Macro() so we avoid logger
spam.

ASTERISK-26570 #close

Change-Id: I6c71b76998c31434391b150de055ae9a531e31da
apps/app_macro.c