Use std::vector and safety checks in DOL loader