]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Prevent invalid access of free'd memory if DAHDI channel during an MWI event
authorRichard Mudgett <rmudgett@digium.com>
Tue, 10 Apr 2012 21:47:42 +0000 (21:47 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 10 Apr 2012 21:47:42 +0000 (21:47 +0000)
commita1bd302d07e7431cf94f039af639093f80eccc43
treeb79f5ac8f37834038a0c81d1dcb864b6f47c8d07
parent0622cbe8d82835bbb746de7c1f12fbf9df485b10
Prevent invalid access of free'd memory if DAHDI channel during an MWI event

In the MWI processing loop, when a valid event occurs the temporary caller ID
information is deallocated.  If a new DAHDI channel is successfully created,
the event is passed up to the analog_ss_thread without error and the loop
exits.  If, however, the DAHDI channel is not created, then the caller ID
struct has been free'd, and the gains reset to their previous level.  This
will almost certainly cause an invalid access to the free'd memory, either
in subsequent calls to callerid_free or calls to callerid_feed.

* Rework the -r361705 patch to better manage the cs and mtd allocated
resources.

* Fixed use of mwimonitoractive flag to be correct if the mwi_thread()
fails to start.
........

Merged revisions 361854 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@361855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_dahdi.c