[Home]

Summary:ASTERISK-20135: Use of ast_asprintf and asprintf needs to be checked for failure.
Reporter:Richard Mudgett (rmudgett)Labels:
Date Opened:2012-07-16 14:16:05Date Closed:2012-08-21 15:46:07
Priority:MajorRegression?
Status:Closed/CompleteComponents:General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:The ast_asprintf() call does not always set the returned buffer pointer to NULL when allocation fails.  This should be fixed because it is useful to assume that the buffer pointer will be NULL on failure.

The use of asprintf() needs to be converted to ast_asprintf() so it can be paired with ast_free() correctly.  Not all places where asprintf() is called can free the allocated buffer by free() because the buffer is passed to a function or put onto a structure that needs to use ast_free().
Comments: