mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 11:29:27 +02:00
+ wasm internal object reader: check that R_WASM_GLOBAL_INDEX_LEB point to a SYMTAB_GLOBAL symbol
This commit is contained in:
parent
30c8930c30
commit
1061965ea5
@ -2678,6 +2678,11 @@ implementation
|
||||
InputError('R_WASM_SECTION_OFFSET_I32 must point to a SYMTAB_SECTION symbol');
|
||||
exit;
|
||||
end;
|
||||
if (RelocType=R_WASM_GLOBAL_INDEX_LEB) and (SymbolTable[RelocIndex].SymKind<>SYMTAB_GLOBAL) then
|
||||
begin
|
||||
InputError('Relocation must point to a SYMTAB_GLOBAL symbol');
|
||||
exit;
|
||||
end;
|
||||
if (RelocType in [
|
||||
R_WASM_FUNCTION_INDEX_LEB,
|
||||
R_WASM_TABLE_INDEX_SLEB,
|
||||
|
Loading…
Reference in New Issue
Block a user