[asterisk-bugs] [JIRA] Closed: (ASTERISK-20135) Use of ast_asprintf and asprintf needs to be checked for failure.

Digium Subversion (JIRA) noreply at issues.asterisk.org
Tue Aug 21 15:47:07 CDT 2012


     [ https://issues.asterisk.org/jira/browse/ASTERISK-20135?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Digium Subversion closed ASTERISK-20135.
----------------------------------------

    Resolution: Fixed

> Use of ast_asprintf and asprintf needs to be checked for failure.
> -----------------------------------------------------------------
>
>                 Key: ASTERISK-20135
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20135
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>            Reporter: Richard Mudgett
>
> 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().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list