Skip to content
Snippets Groups Projects
  • Sean Bright's avatar
    77901a58
    pbx_spool: Gracefully handle long lines in call files · 77901a58
    Sean Bright authored
    Per the linked issue, we aren't checking the buffer filled by fgets()
    to determine if it contains a newline, so we will fail to correctly
    parse the trailing portion of a long line.
    
    This patch increases the buffer size from 256 to 1024, and skips any
    line that exceeds that length, logging a warning in the process.
    
    ASTERISK-17067 #close
    Reported by: Dave Olszewski
    
    Change-Id: I51bcf270c1b4347ba05b43f18dc2094c76f5d7b0
    77901a58
    History
    pbx_spool: Gracefully handle long lines in call files
    Sean Bright authored
    Per the linked issue, we aren't checking the buffer filled by fgets()
    to determine if it contains a newline, so we will fail to correctly
    parse the trailing portion of a long line.
    
    This patch increases the buffer size from 256 to 1024, and skips any
    line that exceeds that length, logging a warning in the process.
    
    ASTERISK-17067 #close
    Reported by: Dave Olszewski
    
    Change-Id: I51bcf270c1b4347ba05b43f18dc2094c76f5d7b0