mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
refactor(il2cpp): decode metadata tables through one shared binary reader (#12554)
This commit is contained in:
5 files changed
+72
-52
No files matched your search
@@ -890,3 +890,24 @@ describe("IL2CPP global-metadata version 24", () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps unsigned legacy literal lengths distinct from signed counted offsets", () => {
|
||||
const legacy = mutated(
|
||||
(fixture, bytes) => {
|
||||
bytes.writeUInt32LE(0xffffffff, fixture.section("stringLiterals").offset);
|
||||
},
|
||||
createIl2cppMetadataFixture({ version: 29 }),
|
||||
);
|
||||
expect(failure(legacy)).toMatchObject({
|
||||
reason: "index-out-of-range",
|
||||
message: expect.stringContaining("4294967295"),
|
||||
});
|
||||
|
||||
const counted = mutated((fixture, bytes) => {
|
||||
bytes.writeInt32LE(-1, fixture.section("stringLiterals").offset);
|
||||
});
|
||||
expect(failure(counted)).toMatchObject({
|
||||
reason: "index-out-of-range",
|
||||
message: expect.stringContaining("[-1,"),
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user