[asterisk-bugs] [Asterisk 0015617]: [patch] crash in LOCAL() if Gosub stack is allocated but empty
Asterisk Bug Tracker
noreply at bugs.digium.com
Sun Aug 9 02:11:44 CDT 2009
The following issue has been RESOLVED.
======================================================================
https://issues.asterisk.org/view.php?id=15617
======================================================================
Reported By: rain
Assigned To: tilghman
======================================================================
Project: Asterisk
Issue ID: 15617
Category: Applications/app_stack
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Asterisk Version: Older 1.6.0
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2009-07-30 14:45 CDT
Last Modified: 2009-08-09 02:11 CDT
======================================================================
Summary: [patch] crash in LOCAL() if Gosub stack is allocated
but empty
Description:
If the Gosub stack is allocated but empty (e.g. outside of a Gosub, but
after a previous call to Gosub on the current channel), local_read() will
crash because it blindly dereferences frame = AST_LIST_FIRST(oldlist),
which will be NULL.
The attached patch (against trunk) ensures that the stack is not empty in
local_read() and deallocates the datastore in return_exec() if the stack is
empty. The latter might not be desirable, but each change is in a separate
hunk in the patch should you only want one of them. The patch applies
cleanly against 1.6.x as well.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-08-09 02:11 svnbot Status assigned => resolved
2009-08-09 02:11 svnbot Resolution open => fixed
======================================================================
More information about the asterisk-bugs
mailing list