* wasm internal object reader: validate that R_WASM_TAG_INDEX_LEB relocations point to a SYMTAB_EVENT symbol

This commit is contained in:
Nikolay Nikolov 2024-01-07 01:43:47 +02:00
parent 962b36a6e8
commit 3121f3f8a0

View File

@ -2697,6 +2697,11 @@ implementation
InputError('Relocation must point to a SYMTAB_GLOBAL symbol');
exit;
end;
if (RelocType=R_WASM_TAG_INDEX_LEB) and (SymbolTable[RelocIndex].SymKind<>SYMTAB_EVENT) then
begin
InputError('Relocation must point to a SYMTAB_EVENT symbol');
exit;
end;
if (RelocType in [
R_WASM_FUNCTION_INDEX_LEB,
R_WASM_TABLE_INDEX_SLEB,