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