Blob Blame History Raw
diff -up ntp-4.2.6p5/ntpd/ntp_config.c.cve-2015-5195 ntp-4.2.6p5/ntpd/ntp_config.c
--- ntp-4.2.6p5/ntpd/ntp_config.c.cve-2015-5195	2015-08-20 12:14:23.911585026 +0200
+++ ntp-4.2.6p5/ntpd/ntp_config.c	2015-08-20 12:15:14.850462173 +0200
@@ -2019,6 +2019,13 @@ config_monitor(
 	while (pfilegen_token != NULL) {
 		filegen_string = keyword(*pfilegen_token);
 		filegen = filegen_get(filegen_string);
+		if (NULL == filegen) {
+			msyslog(LOG_ERR,
+				"stats %s unrecognized",
+				filegen_string);
+			pfilegen_token = next_node(pfilegen_token);
+			continue;
+		}
 
 		DPRINTF(4, ("enabling filegen for %s statistics '%s%s'\n",
 			    filegen_string, filegen->prefix, 
@@ -2032,6 +2039,13 @@ config_monitor(
 	while (my_node != NULL) {
 		filegen_file = keyword(my_node->filegen_token);
 		filegen = filegen_get(filegen_file);
+		if (NULL == filegen) {
+			msyslog(LOG_ERR,
+				"filegen category '%s' unrecognized",
+				filegen_file);
+			my_node = next_node(my_node);
+			continue;
+		}
 
 		/* Initialize the filegen variables to their pre-configurtion states */
 		filegen_flag = filegen->flag;