[asterisk-bugs] [Asterisk 0012780]: [patch] logger.c may random crash asterisk on module unload for some OS

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Jun 3 08:20:21 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12780 
====================================================================== 
Reported By:                ys
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   12780
Category:                   PBX/pbx_config
Reproducibility:            random
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 119891 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-03-2008 08:13 CDT
Last Modified:              06-03-2008 08:20 CDT
====================================================================== 
Summary:                    [patch] logger.c may random crash asterisk on module
unload for some OS
Description: 

logmsg structure contain file and function pointer, which hold pointer to
file name and function name accordingly.
But memory, which these pointer refer, may be already freed and
inaccessible by logger thread - logger_thread(), if the module is already
unloaded at moment that logger thread call function to print this log
entry.

This mainly affected OS that use constructor/destructor.


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

---------------------------------------------------------------------- 
 russell - 06-03-08 08:20  
---------------------------------------------------------------------- 
1) bzero() is not needed since the memory is allocated using calloc()

2) Please use ast_copy_string() instead of strncpy() 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-03-08 08:20  russell        Note Added: 0087703                          
======================================================================




More information about the asterisk-bugs mailing list