]> git.ipfire.org Git - thirdparty/asterisk.git/commit
format_cap: Detect vector allocation failures. 13/1513/1
authorMark Michelson <mmichelson@digium.com>
Thu, 22 Oct 2015 22:07:55 +0000 (17:07 -0500)
committerMark Michelson <mmichelson@digium.com>
Thu, 22 Oct 2015 22:10:30 +0000 (17:10 -0500)
commitebe69dee0d0132bcda93ce909d0a82316e86e8f7
tree2f11e9b273fabbd7d0b1d990a13ad363b244d5a7
parent04030b0dd09421d633f662d7c82efe0c3b554856
format_cap: Detect vector allocation failures.

A crash was seen on a system that ran out of memory due to Asterisk not
checking for vector allocation failures in format_cap.c. With this
change, if either of the AST_VECTOR_INIT calls fail, we will return a
value indicating failure.

Change-Id: Ieb9c59f39dfde6d11797a92b45e0cf8ac5722bc8
main/format_cap.c