[Asterisk-code-review] pbx: Prevent execution of NULL pointer. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jan 4 15:51:43 CST 2018


Corey Farrell has uploaded a new patch set (#2). ( https://gerrit.asterisk.org/7805 )

Change subject: pbx: Prevent execution of NULL pointer.
......................................................................

pbx: Prevent execution of NULL pointer.

pbx_extension_helper has a check for q->swo.exec == NULL but it doesn't
actually return so we would still run the function.  Fix the return.
Move the 'int res' variable into the only scope which uses it.

Also fix a copy-paste error in ast_pbx_init which could result in a
crash on allocation failure (we exit with a normal error instead).

Change-Id: I0693af921fdc7f56b6a72a21fb816ed08b960a69
---
M main/pbx.c
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/05/7805/2
-- 
To view, visit https://gerrit.asterisk.org/7805
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0693af921fdc7f56b6a72a21fb816ed08b960a69
Gerrit-Change-Number: 7805
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180104/777f4f10/attachment.html>


More information about the asterisk-code-review mailing list