mirror of
https://github.com/k1tbyte/Wand-Enhancer.git
synced 2026-08-28 22:01:17 +00:00
7d28eb7d52
Pickle.Resize allocated the backing array as _header.Length + newCapacity but advertised _capacityAfterHeader = newCapacity. On the first growth _header is still empty, so the array ended up _headerSize (4) bytes short of the header + capacity it claimed. A write that fills the payload then overran the buffer, throwing an ArgumentException when the serialised asar header was 4089-4092 bytes. Allocate _headerSize + newCapacity instead, matching Chromium's realloc(header_size_ + new_capacity). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>