mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 17:26:14 +02:00
+ check the code entries count in the wasm object reader
This commit is contained in:
parent
87a3bfe99d
commit
4b179ce4fa
@ -3091,6 +3091,11 @@ implementation
|
||||
InputError('Error reading the code entries cound from the code section');
|
||||
exit;
|
||||
end;
|
||||
if CodeEntriesCount <> (Length(FuncTypes) - FuncTypeImportsCount) then
|
||||
begin
|
||||
InputError('Code segment count in the code section does not match the function definition count in the function section');
|
||||
exit;
|
||||
end;
|
||||
SetLength(CodeSegments,CodeEntriesCount);
|
||||
for i:=0 to CodeEntriesCount-1 do
|
||||
with CodeSegments[i] do
|
||||
|
Loading…
Reference in New Issue
Block a user