mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 20:50:45 +02:00
+ wasm object reader: range check the symbol indices of SYMTAB_FUNCTION entries
This commit is contained in:
parent
efc4ab7928
commit
a6d4374f10
@ -2438,6 +2438,11 @@ implementation
|
||||
InputError('Error reading the index of a ' + SymKindName + ' symbol');
|
||||
exit;
|
||||
end;
|
||||
if ((SymKind=byte(SYMTAB_FUNCTION)) and (SymIndex>high(FuncTypes))) then
|
||||
begin
|
||||
InputError('Symbol index too high');
|
||||
exit;
|
||||
end;
|
||||
if ((SymFlags and WASM_SYM_EXPLICIT_NAME)<>0) or
|
||||
((SymFlags and WASM_SYM_UNDEFINED)=0) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user