[Git][NTPsec/ntpsec][master] Forward-port from Classic: [Bug 2969] Seg fault from ntpq/mrulist when looking a…

Eric S. Raymond gitlab at mg.gitlab.com
Mon Mar 21 02:53:57 UTC 2016


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


Commits:
af46404c by Juergen Perlinger at 2016-03-20T22:53:31-04:00
Forward-port from Classic: [Bug 2969] Seg fault from ntpq/mrulist when looking at server with lots of clients

- - - - -


1 changed file:

- ntpq/ntpq-subs.c


Changes:

=====================================
ntpq/ntpq-subs.c
=====================================
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -2869,7 +2869,7 @@ collect_mru_list(
 				 ri, sptoa(&recent->addr), ri,
 				 recent->last.l_ui, recent->last.l_uf);
 			chars = strlen(buf);
-			if (REQ_ROOM - chars < 1)
+			if (REQ_ROOM <= chars)
 				break;
 			memcpy(req, buf, chars + 1);
 			req += chars;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/af46404ca637af6c538b2a99c2e6d814ad89727c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160321/8e67caef/attachment.html>


More information about the vc mailing list