]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Add assert for parameter m in RGR_FindBestRegression()
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Oct 2013 14:37:40 +0000 (16:37 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 10 Oct 2013 14:37:40 +0000 (16:37 +0200)
regress.c

index 0611292aaea035fb24b9b809a663e53276be15ff..cd001a12210c1c0b8463691a8e0b0abbf5403208 100644 (file)
--- a/regress.c
+++ b/regress.c
@@ -255,7 +255,7 @@ RGR_FindBestRegression
   int start, resid_start, nruns, npoints;
   int i;
 
-  assert(n <= MAX_POINTS);
+  assert(n <= MAX_POINTS && m >= 0);
   assert(n * REGRESS_RUNS_RATIO < sizeof (critical_runs) / sizeof (critical_runs[0]));
 
   if (n < MIN_SAMPLES_FOR_REGRESS) {