[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:37:35 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:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-10-16 03:58 CDT
Last Modified:              2008-10-16 18:37 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.

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

---------------------------------------------------------------------- 
 (0093865) putnopvut (administrator) - 2008-10-16 18:37
 http://bugs.digium.com/view.php?id=13715#c93865 
---------------------------------------------------------------------- 
I'm reopening this...mainly because I'm an idiot. I didn't even think about
the fact that not all dialplan functions actually require that a channel be
defined. It makes much more sense to address the individual dialplan
functions which actually make use of the channel without checking to be
sure the channel is non-NULL.

So your patch for chan_sip.c will definitely help in this matter, but it
seems like a good idea to tackle the other functions which may also be
guilty of the same crime. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-16 18:37 putnopvut      Assigned To              svnbot =>           
2008-10-16 18:37 putnopvut      Note Added: 0093865                          
======================================================================




More information about the asterisk-bugs mailing list