Module Name: src
Committed By: christos
Date: Mon Dec 30 17:41:57 UTC 2013
Modified Files:
src/external/bsd/ntp/dist/ntpd: ntp_scanner.c
Log Message:
prevent coredumps from syntax errors in the config file causing negative
include indexes
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/ntp/dist/ntpd/ntp_scanner.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/ntpd/ntp_scanner.c
diff -u src/external/bsd/ntp/dist/ntpd/ntp_scanner.c:1.5 src/external/bsd/ntp/dist/ntpd/ntp_scanner.c:1.6
--- src/external/bsd/ntp/dist/ntpd/ntp_scanner.c:1.5 Fri Dec 27 22:20:14 2013
+++ src/external/bsd/ntp/dist/ntpd/ntp_scanner.c Mon Dec 30 12:41:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_scanner.c,v 1.5 2013/12/28 03:20:14 christos Exp $ */
+/* $NetBSD: ntp_scanner.c,v 1.6 2013/12/30 17:41:57 christos Exp $ */
/* ntp_scanner.c
@@ -504,7 +504,7 @@ yylex(
if (EOF == ch) {
- if (!input_from_file || !curr_include_level)
+ if (!input_from_file || curr_include_level <= 0)
return 0;
FCLOSE(fp[curr_include_level]);