]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pbx_spool: Gracefully handle long lines in call files
authorSean Bright <sean.bright@gmail.com>
Mon, 6 Mar 2017 19:15:45 +0000 (14:15 -0500)
committerSean Bright <sean.bright@gmail.com>
Mon, 6 Mar 2017 21:29:17 +0000 (16:29 -0500)
commit77901a58ca2aef7ef9b797bf7e7c3c1606d017ae
tree51a917bc3750f3203083762c37b2e322d47d3265
parent4271c700f747f40dd2f46f1f868cfb89d1cf78f8
pbx_spool: Gracefully handle long lines in call files

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
pbx/pbx_spool.c