mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-08 13:50:20 +00:00
The name vectors were sized from NumberOfNames before the name and ordinal arrays were range-checked. A NumberOfNames of 0xFFFFFFFF asked for about four billion strings and failed with std::bad_alloc. Require the name array (4 bytes per entry) and the ordinal array (2 bytes per entry) to lie inside the file before any allocation, and throw a runtime_error otherwise.