Files
lightcraft/crates
darthnutandClaude Opus 5.5 2e5c1dd41d Never crash: tone curves take NaN input and lookup tables shorter than two entries (#2579)
MonotoneCurve::eval let NaN past both bound checks into the binary search, which then
indexed one past the end (or, for a NaN with the sign bit set, underflowed to -1).
to_lut(1) divided 0 by 0, and Lut1::eval underflowed on `n - 2` for a table under two
entries, which its public `v` allows.

NaN now comes back as NaN, as Lut1::eval already did; to_lut, Lut1::identity and
Lut1::from_fn make at least two entries; and a shorter table built by hand reads as a
constant (one entry) or the identity (none). No caller reaches these today. Item 3 of #2579.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 09:31:29 -07:00
..
2026-10-22 02:53:00 +00:00
2026-10-21 14:54:06 +00:00
2026-10-22 02:53:42 +00:00
2026-10-15 03:40:17 -04:00
2026-10-22 02:53:42 +00:00
2026-10-22 02:53:42 +00:00
2026-10-22 02:49:52 +00:00
2026-10-14 22:31:41 -04:00