2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Allow configuration files without a newline at the end now parse

without error. Should allow Windows users to edit their configuration
files with NOTEPAD.EXE, or other text editors that don't believe in a
final newline.

See RT ticket #17120 for more.
This commit is contained in:
Shane Kerr
2007-09-17 09:56:29 +00:00
parent f02216f5b3
commit e6555b0467
2 changed files with 5 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
2243. [func] Configuration files without a newline at the end now
parse without error. [RT #17120]
2242. [bug] nsupdate: GSS-TSIG support using the Heimdal Kerberos
library could require a source of random data.
[RT #17127]

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lex.c,v 1.85 2007/06/19 23:47:17 tbox Exp $ */
/* $Id: lex.c,v 1.86 2007/09/17 09:56:29 shane Exp $ */
/*! \file */
@@ -720,11 +720,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
state = lexstate_ccomment;
break;
case lexstate_eatline:
if (c == EOF) {
result = ISC_R_UNEXPECTEDEND;
goto done;
}
if (c == '\n') {
if ((c == '\n') || (c == EOF)) {
no_comments = ISC_FALSE;
state = saved_state;
goto no_read;