mirror of
https://github.com/junegunn/fzf.git
synced 2026-07-19 22:50:35 +08:00
On 32-bit platforms (GOARCH=386, arm), N*M overflows int when N is large and M approaches 1000, wrapping negative. The wrapped value slips past both `N*M > cap(slab.I16)` and `M > 1000`, so the V1 fallback is skipped and alloc16 panics on a negative slice bound. Cast to int64 before multiplying. Affects shipped 32-bit ARM builds (linux_armv5/6/7, windows_armv5/6/7). Reported with fix by Michal Majchrowicz and Marcin Wyczechowski (AFINE Team).