mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 17:29:07 +02:00
Ensure ErrNo is within the limits of Integer to prevent range error when ReadUnsignedInt returns false.
This commit is contained in:
parent
0375bb8ae9
commit
d30cfb0a95
@ -3761,8 +3761,10 @@ begin
|
||||
SizeVal(SizeOf(LongInt)), ErrNo)
|
||||
then
|
||||
ExceptName := Format('RunError(%d)', [ErrNo])
|
||||
else
|
||||
else begin
|
||||
ExceptName := 'RunError(unknown)';
|
||||
ErrNo := 0;
|
||||
end;
|
||||
|
||||
ExceptItem := Exceptions.Find(ExceptName);
|
||||
if (ExceptItem <> nil) and (ExceptItem.Enabled)
|
||||
@ -3797,8 +3799,10 @@ begin
|
||||
SizeVal(SizeOf(Word)), ErrNo)
|
||||
then
|
||||
ExceptName := Format('RunError(%d)', [ErrNo])
|
||||
else
|
||||
else begin
|
||||
ExceptName := 'RunError(unknown)';
|
||||
ErrNo := 0;
|
||||
end;
|
||||
|
||||
ExceptItem := Exceptions.Find(ExceptName);
|
||||
if (ExceptItem <> nil) and (ExceptItem.Enabled)
|
||||
|
Loading…
Reference in New Issue
Block a user