]> git.ipfire.org Git - thirdparty/asterisk.git/commit
CLI: Address multiple issues.
authorCorey Farrell <git@cfware.com>
Tue, 19 Dec 2017 02:12:47 +0000 (21:12 -0500)
committerCorey Farrell <git@cfware.com>
Tue, 19 Dec 2017 21:43:57 +0000 (15:43 -0600)
commit60213f03515d170c8fcc3fb6868cc6f661b260cf
tree74ffea2534c81cc7c5bd6df0329734a117cc7940
parentb4663f3554f889ad07593f6ef6890389031d6c49
CLI: Address multiple issues.

* listen uses the variable `s` for the result from ast_poll() then
  overwrites it with the result of accept().  Create a separate variable
  poll_result to avoid confusion since ast_poll does not return a file
  descriptor.
* Resolve fd leak that would occur if setsockopt failed in listen.
* Reserve an extra byte while processing completion results from remote
  daemon.  This fixes a bug where completion processing used strstr() on
  a string that was not '\0' terminated.  This was no risk to the Asterisk
  daemon, the bug was only reachable the remote console process.
* Resolve leak in handle_showchan when the channel is not found.
* Multiple leaks and a deadlock in pbx_config CLI completion.
* Fix leaks in "manager show command".

Change-Id: I8f633ceb1714867ae30ef4e421858f77c14485a9
main/asterisk.c
main/cli.c
main/manager.c
pbx/pbx_config.c