]> git.ipfire.org Git - thirdparty/asterisk.git/commit
core: Fix handling of maximum length lines in config files.
authorCorey Farrell <git@cfware.com>
Fri, 23 Feb 2018 16:09:46 +0000 (11:09 -0500)
committerCorey Farrell <git@cfware.com>
Fri, 23 Feb 2018 17:14:59 +0000 (11:14 -0600)
commitcaad0c09cd9e2ab002baebc159c92c82bb0712fd
treef797bab03c9254dacb14ae409abf3afa05571579
parent499f0bfd72b3e36024cea8ac373566e312ec0dbc
core: Fix handling of maximum length lines in config files.

When a line is the maximum length "\n" is found at sizeof(buf) - 2 since
the last character is actually the null terminator.  In addition if a
line was exactly 8190 plus a multiple of 8192 characters long the config
parser would skip the following line.

Additionally fix comment in voicemail.conf sample config.  It previously
stated that emailbody can only contain up to 512 characters which is
always wrong.  The buffer is normally 8192 characters unless LOW_MEMORY
is enabled then it is 512 characters.  The updated comment states that
the line can be up to 8190 or 510 characters since the line feed and
NULL terminator each use a character.

ASTERISK-26688 #close

Change-Id: I80864a0d40d2e2d8cd79d72af52a8f0a3a99c015
configs/samples/voicemail.conf.sample
main/config.c