]> 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:59:00 +0000 (07:59 -0600)
commit5dffdf79d1b3d725bf799971841504160097fdee
treeacedd3bacfcb08a3f6002bfa0e3c890dd128a224
parent2d0fb07f53b4dc8def071694fada6099174d93fd
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