Files
epics-base/modules/database
Jacqueline GarrahanandClaude Opus 4.8 fde8e4ca2e histogramRecord: fix heap OOB write when SGNL approaches ULIM
The bin-search loop in add_count() assumes nelm*wdth == ulim-llim, but
wdth is a rounded quotient so nelm*wdth can be strictly less than
ulim-llim.  A SGNL value just below ULIM then leaves the loop with
i == nelm+1, and pdest = bptr + nelm writes one epicsUInt32 past the
nelm-element buffer.  This is reachable over Channel Access by putting a
value near ULIM to the SGNL field (special SPC_MOD).  Clamp the index to
nelm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 14:17:43 -05:00
..