Files
epics-base/modules/ca/src/client
Sang Woo Kim ce775a80cf udpiiu: reject a non-finite or non-positive EPICS_CA_MAX_SEARCH_PERIOD
epicsScanDouble accepts "inf" and "nan", so envGetDoubleConfigParam
returns success for them and the parsed value flows into getMaxPeriod's
only range gate, maxPeriod < maxSearchPeriodLowerLimit. That comparison
is false for both inf and NaN, so a non-finite period reaches
getNTimers(), whose static_cast<unsigned> of 1 + log(maxPeriod/...)/log2
is an undefined float->unsigned conversion: inf aborts the client in
malloc via a garbage nTimers allocation, and NaN drives the search-timer
wheel off a NaN period where every deadline comparison is false.

Gate the parsed value on finite() (from epicsMath.h) and positivity
alongside the parse status, and fall back to the default period. A
non-positive period is not a "low" period to be clamped up to the 60 s
lower limit; it takes the same invalid-input path as inf/NaN.

getMaxPeriod() is getNTimers()'s only caller, so this makes the
conversion finite and positive by construction.
2026-07-21 14:15:43 -05:00
..
2021-08-29 07:27:50 -07:00
2025-12-01 19:00:04 -08:00
2025-12-01 19:00:04 -08:00
2025-12-01 19:00:04 -08:00
2018-06-19 11:33:25 +02:00
2026-01-01 19:07:10 -08:00
2026-02-18 10:34:08 -06:00
2026-01-01 19:07:10 -08:00
2025-12-01 19:00:04 -08:00
2025-12-01 19:00:04 -08:00
2018-06-19 11:33:25 +02:00
2025-12-17 16:34:58 -08:00
2023-07-22 08:35:59 -07:00
2021-08-29 07:27:50 -07:00
2025-12-01 19:00:04 -08:00
2025-12-17 16:34:58 -08:00
2018-06-19 11:33:25 +02:00
2021-08-29 07:27:50 -07:00
2026-02-18 10:34:08 -06:00
2021-08-29 07:27:50 -07:00
2025-12-01 19:00:04 -08:00
2026-02-18 10:34:08 -06:00
2026-02-18 10:34:08 -06:00
2021-08-29 07:27:50 -07:00
2026-01-01 19:07:10 -08:00
2021-08-29 07:27:50 -07:00
2026-07-06 16:29:52 -07:00
2018-06-19 11:33:25 +02:00
2025-12-01 19:00:04 -08:00
2021-08-29 07:27:50 -07:00
2025-12-01 19:00:04 -08:00
2026-02-18 10:34:08 -06:00
2025-12-01 19:00:04 -08:00
2026-02-18 10:34:08 -06:00