]> git.ipfire.org Git - thirdparty/asterisk.git/commit
format_cap: Detect vector allocation failures. 14/1514/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:29:10 +0000 (17:29 -0500)
commitb95101aab02b2e371a504ed73b0ae629ddc7cf09
tree173c1721b1950ce3cb9a645c65f634474fd0c6ff
parentb5cfcfc427238c2a42f5fbfc758e18ebf8dfc04a
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