mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 18:40:37 +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');
|
InputError('Error reading import tag type index');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if TagTypeIdx>high(FFuncTypes) then
|
||||||
|
begin
|
||||||
|
InputError('Type index in tag import exceeds bounds of the types table');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
@ -3723,6 +3728,11 @@ implementation
|
|||||||
InputError('Error reading tag type index');
|
InputError('Error reading tag type index');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if TagTypeIdx>high(FFuncTypes) then
|
||||||
|
begin
|
||||||
|
InputError('Type index in tag import exceeds bounds of the types table');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if AReader.Pos<>(SectionStart+SectionSize) then
|
if AReader.Pos<>(SectionStart+SectionSize) then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user