[asterisk-bugs] [Asterisk 0016040]: [patch] reference argument sub in handle_transfer_button after we check it

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 10 14:08:37 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16040 
====================================================================== 
Reported By:                ebroad
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   16040
Category:                   Channels/chan_skinny
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-10-07 23:56 CDT
Last Modified:              2009-11-10 14:08 CST
====================================================================== 
Summary:                    [patch] reference argument sub in
handle_transfer_button after we check it
Description: 
Currently, we reference sub before we check if it is null or not, this can
lead to a segfault if we attempt to transfer a non-existent channel.
====================================================================== 

---------------------------------------------------------------------- 
 (0113604) wedhorn (reporter) - 2009-11-10 14:08
 https://issues.asterisk.org/view.php?id=16040#c113604 
---------------------------------------------------------------------- 
The coding guidelines indicate that the variable definition needs to go at
the beginning of the block. But you are correct that the assignment needs
to go after the test. This is a segfault waiting to happen. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-11-10 14:08 wedhorn        Note Added: 0113604                          
======================================================================




More information about the asterisk-bugs mailing list