Summary: | ASTERISK-02132: [patch] Manager command ZapDialOffhook crashes when channel doesn't exist | ||
Reporter: | sremington (sremington) | Labels: | |
Date Opened: | 2004-07-28 11:49:08 | Date Closed: | 2008-01-15 15:03:45.000-0600 |
Priority: | Critical | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20040728_chan_zap.c.txt | |
Description: | If the Manager API command ZapDialOffhook is called with an invalid ZapChannel parameter asterisk will crash. In the action_zapdialoffhook()... p = find_channel(atoi(channel)); p will be NULL if the ZapChannel parameter isn't valid and the next line... if (!p->owner) ... will access memory at 0x0 since p is NULL. The patch simply moves the check for !p before the check for !p->owner. | ||
Comments: | By: Mark Spencer (markster) 2004-07-28 14:52:25 Fixed in CVS By: Digium Subversion (svnbot) 2008-01-15 15:03:45.000-0600 Repository: asterisk Revision: 3527 U trunk/channels/chan_zap.c ------------------------------------------------------------------------ r3527 | markster | 2008-01-15 15:03:44 -0600 (Tue, 15 Jan 2008) | 2 lines Fix "ZapOffHook" (bug ASTERISK-2132) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=3527 |