mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 13:45:30 +00:00
fix(il2cpp): validate record extents before width inference (#12429)
This commit is contained in:
1 parent
7cc7bda6e3
commit
0ea671abf5
4 files changed
+135
-68
No files matched your search
@@ -25,15 +25,17 @@ export interface MetadataMemberOwners {
|
||||
|
||||
/** Own member record widths and validate all counts before any row allocation. */
|
||||
export const readIl2cppMemberTables = ({
|
||||
widths,
|
||||
typeIndexWidth,
|
||||
indexing,
|
||||
section,
|
||||
}: Pick<MetadataTables, "widths" | "indexing" | "section">) => {
|
||||
}: Pick<MetadataTables, "indexing" | "section"> & {
|
||||
readonly typeIndexWidth: MetadataTables["widths"]["type"];
|
||||
}) => {
|
||||
const recordBytes = {
|
||||
fields: 8 + widths.type,
|
||||
fields: 8 + typeIndexWidth,
|
||||
properties: 20,
|
||||
events: 20 + widths.type,
|
||||
parameters: 8 + widths.type,
|
||||
events: 20 + typeIndexWidth,
|
||||
parameters: 8 + typeIndexWidth,
|
||||
stringLiterals: indexing === "counted" ? 4 : 8,
|
||||
};
|
||||
const literalRecords = checkedSectionCount(
|
||||
|
||||
Reference in new issue
Block a user