[asterisk-bugs] [Asterisk 0010858]: Segfault if ast_cli_register is called multiple times with same data

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Oct 1 00:40:43 CDT 2007


The following issue has been UPDATED. 
====================================================================== 
http://bugs.digium.com/view.php?id=10858 
====================================================================== 
Reported By:                jamesgolovich
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10858
Category:                   Core-General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 84149 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-01-2007 00:39 CDT
Last Modified:              10-01-2007 00:40 CDT
====================================================================== 
Summary:                    Segfault if ast_cli_register is called multiple
times with same data
Description: 
This was brought to my attention by the bug I just opened
http://bugs.digium.com/view.php?id=10856.  There
are 2 calls to ast_cli_register(&cli_refresh).  When the 2nd one gets
called, it clearly already exists so if we call ast_free(e->_full_cmd); and
set it to NULL then the next time that list gets walked we segfault.

Just commenting out those 2 lines (in __ast_cli_register about line 1416)
stops the issue, but there might be some memory left hanging around.  I
haven't had a chance to dive into the NEW_CLI stuff, so I'm not sure what
the best solution here is.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-01-07 00:40  jamesgolovich  Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list