]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx: Fix crash when issuing "core show hints" with long pattern match. 75/1175/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:47:39 +0000 (12:47 -0500)
commit9f5e1c0e560de48cffbf534bafc5b82958e9f850
tree4b2db54372717f9e6c5a5b0cbb00a72c92725724
parent1c89230e2a0509bad7de0c4f2146f8ebf7772802
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