mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
+ wasm internal object reader: bounds check the tag type index against the types table
This commit is contained in:
parent
2de0bcb8d0
commit
79d739baa6
@ -3368,6 +3368,11 @@ implementation
|
||||
InputError('Error reading import tag type index');
|
||||
exit;
|
||||
end;
|
||||
if TagTypeIdx>high(FFuncTypes) then
|
||||
begin
|
||||
InputError('Type index in tag import exceeds bounds of the types table');
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
else
|
||||
@ -3723,6 +3728,11 @@ implementation
|
||||
InputError('Error reading tag type index');
|
||||
exit;
|
||||
end;
|
||||
if TagTypeIdx>high(FFuncTypes) then
|
||||
begin
|
||||
InputError('Type index in tag import exceeds bounds of the types table');
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
if AReader.Pos<>(SectionStart+SectionSize) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user