[Git][NTPsec/ntpsec][master] Forward-port from Classic: [Bug 2887] fudge stratum only accepts values [0..16].

Eric S. Raymond gitlab at mg.gitlab.com
Mon Mar 21 01:47:48 UTC 2016


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


Commits:
bcb2ca75 by Juergen Perlinger at 2016-03-20T21:45:48-04:00
Forward-port from Classic: [Bug 2887] fudge stratum only accepts values [0..16].

- - - - -


1 changed file:

- ntpd/ntp_parser.y


Changes:

=====================================
ntpd/ntp_parser.y
=====================================
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -971,7 +971,14 @@ fudge_factor
 	|	fudge_factor_bool_keyword boolean
 			{ $$ = create_attr_ival($1, $2); }
 	|	T_Stratum T_Integer
-			{ $$ = create_attr_ival($1, $2); }
+		{
+			if ($2 >= 0 && $2 <= 16) {
+				$$ = create_attr_ival($1, $2);
+			} else {
+				$$ = NULL;
+				yyerror("fudge factor: stratum value not in [0..16], ignored");
+			}
+		}
 	|	T_Abbrev T_String
 			{ $$ = create_attr_sval($1, $2); }
 	|	T_Refid T_String



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


More information about the vc mailing list