[asterisk-bugs] [Asterisk 0013858]: [patch] On memory allocation failure return NULL or we will crash.

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Nov 18 19:00:08 CST 2008


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=13858 
====================================================================== 
Reported By:                eliel
Assigned To:                svnbot
====================================================================== 
Project:                    Asterisk
Issue ID:                   13858
Category:                   Core/AstMM
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     resolved
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 155240 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2008-11-07 05:18 CST
Last Modified:              2008-11-18 19:00 CST
====================================================================== 
Summary:                    [patch] On memory allocation failure return NULL or
we will crash.
Description: 
ast_alloc_region needs to give up (return NULL) if the ast_region structure
couldn't be allocated or asterisk will crash while trying the next line:

ast_copy_string(reg->file, file, sizeof(reg->file));
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-11-18 19:00 svnbot         Status                   new => resolved     
2008-11-18 19:00 svnbot         Resolution               open => fixed       
2008-11-18 19:00 svnbot         Assigned To               => svnbot          
======================================================================




More information about the asterisk-bugs mailing list