mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
regress: avoid undefined behavior in pointer arithmetic
This commit is contained in:
@@ -285,7 +285,7 @@ RGR_FindBestRegression
|
||||
n - start <= min_samples) {
|
||||
if (start != resid_start) {
|
||||
/* Ignore extra samples in returned nruns */
|
||||
nruns = n_runs_from_residuals(resid - resid_start + start, n - start);
|
||||
nruns = n_runs_from_residuals(resid + (start - resid_start), n - start);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user