[asterisk-dev] Is this a bug in frame.c?

Kevin P. Fleming kpfleming at digium.com
Thu Jun 8 09:56:30 MST 2006


----- Slav Klenov <slav at securax.org> wrote:

>     if (!(fr->mallocd & AST_MALLOCD_DATA))  {
>         if (!(newdata = ast_malloc(fr->datalen +
> AST_FRIENDLY_OFFSET))) {
>             if(out != fr)
>                 free(out);
>             return NULL;
>         }
>         newdata += AST_FRIENDLY_OFFSET;

There were multiple problems still left in that function in the case of out-of-memory conditions; I believe I corrected them all in both branches, but please double-check my work :-)

-- 
Kevin P. Fleming
Senior Software Engineer
Digium, Inc.




More information about the asterisk-dev mailing list