Summary: | ASTERISK-17067: Long lines in call files cause spurious syntax error | ||
Reporter: | Dave Olszewski (cxreg) | Labels: | |
Date Opened: | 2010-12-05 00:41:46.000-0600 | Date Closed: | 2017-03-07 17:21:37.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | PBX/pbx_spool |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
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 | ||
Comments: | By: Friendly Automation (friendly-automation) 2017-03-07 17:21:38.520-0600 Change 5125 merged by Joshua Colp: pbx_spool: Gracefully handle long lines in call files [https://gerrit.asterisk.org/5125|https://gerrit.asterisk.org/5125] By: Friendly Automation (friendly-automation) 2017-03-07 17:23:54.729-0600 Change 5126 merged by zuul: pbx_spool: Gracefully handle long lines in call files [https://gerrit.asterisk.org/5126|https://gerrit.asterisk.org/5126] By: Friendly Automation (friendly-automation) 2017-03-07 17:55:35.742-0600 Change 5127 merged by zuul: pbx_spool: Gracefully handle long lines in call files [https://gerrit.asterisk.org/5127|https://gerrit.asterisk.org/5127] |