summaryrefslogtreecommitdiff
path: root/formats/format_siren14.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2012-04-16 21:58:06 +0000
committerMatthew Jordan <mjordan@digium.com>2012-04-16 21:58:06 +0000
commit2fed9cfa8f92eadda1fd8569cadb912701f1a311 (patch)
tree44d4af37306739492c871dacad186a1434f76482 /formats/format_siren14.c
parentebcccf8997764b3aa84d36112ae8380703e1d053 (diff)
Fix negative return handling in channel drivers
In chan_agent, while handling a channel indicate, the agent channel driver must obtain a lock on both the agent channel, as well as the channel the agent channel is using. To do so, it attempts to lock the other channel first, then unlock the agent channel which is locked prior to entry into the indicate handler. If this unlock fails with a negative return value, which can occur if the object passed to agent_indicate is an invalid ao2 object or is NULL, the return value is passed directly to strerror, which can only accept positive integer values. In chan_dahdi, the return value of dahdi_get_index is used to directly index into the sub-channel array. If dahd_get_index returns a negative value, it would use that value to index into the array, which could cause an invalid memory access. If dahdi_get_index returns a negative number, we now default to SUB_REAL. (issue ASTERISK-19655) Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/1863/ ........ Merged revisions 362204 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 362205 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'formats/format_siren14.c')
0 files changed, 0 insertions, 0 deletions