]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx: Fix crash when issuing "core show hints" with long pattern match. 74/1174/1
authorJoshua Colp <jcolp@digium.com>
Wed, 2 Sep 2015 17:41:10 +0000 (14:41 -0300)
committerJoshua Colp <jcolp@digium.com>
Wed, 2 Sep 2015 17:41:10 +0000 (14:41 -0300)
commitcc1363209e7a5b6c67bf96c593e3beb0884c1fb0
tree1dfe12cb021c5479157203087870572374128e8e
parentd58c8d73afae1a2d7f3cb4dcc3abb799b567a7c6
pbx: Fix crash when issuing "core show hints" with long pattern match.

When issuing the "core show hints" CLI command a combination of both
the hint extension and context is created. This uses a fixed size
buffer expecting that the extension will not exceed maximum extension
length. When the extension is actually a pattern match this constraint
does not hold true, and the extension may exceed the maximum extension
length. In this case extra characters are written past the end of the
fixed size buffer.

This change makes it so the construction of the combined hint extension
and context can not exceed the size of the buffer.

ASTERISK-25367 #close

Change-Id: Idfa1b95d0d4dc38e675be7c1de8900b3f981f499
main/pbx.c