[asterisk-bugs] [Asterisk 0018425]: Long lines in call files cause spurious syntax error

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Dec 5 00:41:46 CST 2010


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18425 
====================================================================== 
Reported By:                cxreg
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18425
Category:                   PBX/pbx_spool
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.14 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-12-05 00:41 CST
Last Modified:              2010-12-05 00:41 CST
====================================================================== 
Summary:                    Long lines in call files cause spurious syntax error
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 History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-12-05 00:41 cxreg          New Issue                                    
2010-12-05 00:41 cxreg          Asterisk Version          => 1.6.2.14        
2010-12-05 00:41 cxreg          Regression                => No              
2010-12-05 00:41 cxreg          SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list