|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:05||Date Closed:||2012-08-21 15:46:07|
|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().