Asterisk
  1. Asterisk
  2. ASTERISK-17067

Long lines in call files cause spurious syntax error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: 13.15.0, 14.4.0, 15.0.0
    • Component/s: PBX/pbx_spool
    • Labels:
      None
    • Mantis ID:
      18425
    • Regression:
      No

      Description

      The main loop in pbx/pbx_spool.c:apply_outgoing uses fgets() to loop over the lines in the call file, but the buffer size is only 256 and it never checks if the characters read contain a newline. This means that any line longer than 256 will likely cause a syntax error on the next read, because it picks up where the last read left off, in addition to mishandling the first short read.

      This issue appears to have been around for a long time, and is also reported at http://projectb14ck.org/the-asterisk-spooling-daemon

        Issue Links

          Activity

          Hide
          Friendly Automation added a comment -

          Change 5125 merged by Joshua Colp:
          pbx_spool: Gracefully handle long lines in call files

          https://gerrit.asterisk.org/5125

          Show
          Friendly Automation added a comment - Change 5125 merged by Joshua Colp: pbx_spool: Gracefully handle long lines in call files https://gerrit.asterisk.org/5125
          Hide
          Friendly Automation added a comment -

          Change 5126 merged by zuul:
          pbx_spool: Gracefully handle long lines in call files

          https://gerrit.asterisk.org/5126

          Show
          Friendly Automation added a comment - Change 5126 merged by zuul: pbx_spool: Gracefully handle long lines in call files https://gerrit.asterisk.org/5126
          Hide
          Friendly Automation added a comment -

          Change 5127 merged by zuul:
          pbx_spool: Gracefully handle long lines in call files

          https://gerrit.asterisk.org/5127

          Show
          Friendly Automation added a comment - Change 5127 merged by zuul: pbx_spool: Gracefully handle long lines in call files https://gerrit.asterisk.org/5127

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development