mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
The original code allocated vertex/bone buffers using hardcoded multipliers that assumed a maximum of ~3 bones per vertex. Skeletons with vertices exceeding this limit caused a heap-buffer-overflow, corrupting adjacent heap metadata and crashing on subsequent loads. Fix uses a two-pass approach: first scan the binary data to compute exact buffer sizes needed, then rewind and read. This produces exact-fit allocations with zero waste. Fixes #2992