[asterisk-bugs] [Asterisk 0013715]: [patch] Using SIP_HEADER in AMI with NULL channel causes crash

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Oct 16 18:24:07 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13715 
====================================================================== 
Reported By:                makoto
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13715
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.2.X 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-16 03:58 CDT
Last Modified:              2008-10-16 18:24 CDT
====================================================================== 
Summary:                    [patch] Using SIP_HEADER in AMI with NULL channel
causes crash
Description: 
Connect to AMI, then send the following lines.
So asterisk will crash.

Action: GetVar
Channel: 
Variable: SIP_HEADER(P-Called-Party-ID)

I have tested only on 1.2, but I believe that it happens on 1.4 or later.

Attached patch will fix the problem.

====================================================================== 

---------------------------------------------------------------------- 
 (0093864) svnbot (reporter) - 2008-10-16 18:24
 http://bugs.digium.com/view.php?id=13715#c93864 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 150298

U   branches/1.4/main/manager.c

------------------------------------------------------------------------
r150298 | mmichelson | 2008-10-16 18:24:06 -0500 (Thu, 16 Oct 2008) | 10
lines

Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has
been specified. Several dialplan functions, including
CHANNEL and SIP_HEADER, do not check for NULL-ness of
the channel being passed in.

(closes issue http://bugs.digium.com/view.php?id=13715)
Reported by: makoto


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=150298 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-16 18:24 svnbot         Checkin                                      
2008-10-16 18:24 svnbot         Note Added: 0093864                          
======================================================================




More information about the asterisk-bugs mailing list