Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist/ntpd prevent coredumps from syntax err...



details:   https://anonhg.NetBSD.org/src/rev/886a861fc102
branches:  trunk
changeset: 325587:886a861fc102
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Dec 30 17:41:57 2013 +0000

description:
prevent coredumps from syntax errors in the config file causing negative
include indexes

diffstat:

 external/bsd/ntp/dist/ntpd/ntp_scanner.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e6449dadbd36 -r 886a861fc102 external/bsd/ntp/dist/ntpd/ntp_scanner.c
--- a/external/bsd/ntp/dist/ntpd/ntp_scanner.c  Mon Dec 30 14:17:54 2013 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_scanner.c  Mon Dec 30 17:41:57 2013 +0000
@@ -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 @@
 
                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]);



Home | Main Index | Thread Index | Old Index