[asterisk-bugs] [JIRA] (ASTERISK-25533) buffer for ast_format_cap_get_names only 64 bytes

Alexander Traud (JIRA) noreply at issues.asterisk.org
Mon Nov 9 03:01:33 CST 2015


Alexander Traud created ASTERISK-25533:
------------------------------------------

             Summary: buffer for ast_format_cap_get_names only 64 bytes
                 Key: ASTERISK-25533
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25533
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Formats/General
    Affects Versions: 13.6.0, SVN
            Reporter: Alexander Traud
            Severity: Trivial


Several places in code output the names of all formats/codecs to the end-user, for example on the CLI via {{sip show settings}} or {{pjsip show endpoint}}. I was trapped by this issue while debugging/monitoring a SIP/SDP negotiation. If that list of names (including the commas) is longer than 64 bytes, the list is incomplete and ends with a {{|}}. This can be overlooked easily. For a project of mine, I added several new formats for pass-through and transcoding. Furthermore while testing, I allowed all formats. In my case, the length was 262 characters. Even with the built-in codecs and all allowed, 64 bytes were not enough.

The attached patch tries to fix all occurrences. In main/manager.c, the buffer was increased in master already. Furthermore, different values are used already (64, 128, 256). The proposed patch changes all occurrences to a rather unique value of 384. This amount is not only sufficient for my case, but helps to find these buffers, when an even bigger buffer is required one day.



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



More information about the asterisk-bugs mailing list