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

Rusty Newton (JIRA) noreply at issues.asterisk.org
Mon Jul 16 16:11:20 CDT 2012


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

Rusty Newton updated ASTERISK-20135:
------------------------------------

    Status: Open  (was: Triage)

> 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