[asterisk-bugs] [JIRA] (ASTERISK-23220) STACK_PEEK function with no arguments causes crash/core dump
Corey Farrell (JIRA)
noreply at issues.asterisk.org
Thu Jan 30 03:43:02 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23220?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Corey Farrell updated ASTERISK-23220:
-------------------------------------
Attachment: ASTERISK-23220.patch
I can confirm this issue exists in all current branches + trunk for functions STACK_PEEK and LOCAL_PEEK.
STACK_PEEK also crashes when called with a single parameter only:
STACK_PEEK(1) will crash
STACK_PEEK(1,) logs an error without crashing.
The attached patch prevents STACK_PEEK and LOCAL_PEEK from crashing due to missing parameters, logging an error instead.
> STACK_PEEK function with no arguments causes crash/core dump
> ------------------------------------------------------------
>
> Key: ASTERISK-23220
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23220
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_stack
> Affects Versions: 11.4.0
> Environment: Centos 6.4, amd64
> Reporter: James Sharp
> Attachments: ASTERISK-23220.patch
>
>
> When setting up to use STACK_PEEK, I inadvertently left the arguments out of the dialplan. When the dialplan reached this point in execution, Asterisk crashed with a core. I realize that it was my error in the configuration, but I feel the system should flag an error rather than crash in a blaze of core dumps. If this is a true bug, I can rebuild the system with DONT_OPTIMIZE to get a full backtrack.
> The offending dialplan entry is this:
> exten => 9998,1,Set(FOO=${STACK_PEEK()})
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list