[asterisk-bugs] [JIRA] (ASTERISK-23587) CB_ADD_LEN does not do what you'd think

Rusty Newton (JIRA) noreply at issues.asterisk.org
Thu Apr 3 19:08:19 CDT 2014


Rusty Newton created ASTERISK-23587:
---------------------------------------

             Summary: CB_ADD_LEN does not do what you'd think
                 Key: ASTERISK-23587
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23587
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Core/Configuration, Core/General
    Affects Versions: SVN, 1.8.26.1
            Reporter: Walter Doekes
            Assignee: Walter Doekes
            Severity: Trivial


What's wrong with this code? ;)

{code}
static void  CB_ADD_LEN(struct ast_str **cb, const char *str, int len)
{
        char *s = ast_alloca(len + 1);
        ast_copy_string(s, str, len);
        ast_str_append(cb, 0, "%s", str);
}
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list