[Git][NTPsec/ntpsec][master] Avoid a core dump due to null peer during pool query.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Aug 17 16:08:55 UTC 2017


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


Commits:
f8e9e13d by Eric S. Raymond at 2017-08-17T12:08:22-04:00
Avoid a core dump due to null peer during pool query.

- - - - -


1 changed file:

- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -852,7 +852,8 @@ receive(
             case AM_NEWPASS:
 		handle_fastxmit(rbufp, restrict_mask, pkt, peer, authenticated);
 		sys_processed++;
-		peer->processed++;
+		if (peer != NULL)	/* possible during pool query */
+		    peer->processed++;
 		break;
 	    case AM_PROCPKT:
 		handle_procpkt(rbufp, restrict_mask, pkt, peer, authenticated);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f8e9e13db58999a63994faa0e11992211f82ab2c

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f8e9e13db58999a63994faa0e11992211f82ab2c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170817/da8e7c3d/attachment.html>


More information about the vc mailing list