[Git][NTPsec/ntpsec][master] Add a sanity check for unpeer addresses.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Feb 11 15:01:14 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
657dc8c1 by Eric S. Raymond at 2017-02-11T10:01:03-05:00
Add a sanity check for unpeer addresses.

- - - - -


1 changed file:

- ntpd/ntp_config.c


Changes:

=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -2983,6 +2983,11 @@ config_unpeers(
 			continue;
 		}
 
+		if (curr_unpeer->addr == NULL) {
+			msyslog(LOG_ERR, "invalid address in unpeer command");
+			continue;
+		}
+		
 		ZERO(peeraddr);
 		AF(&peeraddr) = curr_unpeer->addr->type;
 		name = curr_unpeer->addr->address;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/657dc8c107040f550ecb8d01226af4ba0a2f71ba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170211/ca08ed35/attachment.html>


More information about the vc mailing list