mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 10:55:56 +02:00
FPDebug: fix dwarf reader. do not scan past end of data
git-svn-id: trunk@43298 -
This commit is contained in:
parent
c3cd2af441
commit
eb2df97821
@ -3807,7 +3807,7 @@ begin
|
|||||||
MaxData := FInfoData + FLength;
|
MaxData := FInfoData + FLength;
|
||||||
Scope := AStartScope;
|
Scope := AStartScope;
|
||||||
p := Scope.Entry;
|
p := Scope.Entry;
|
||||||
while (p <= MaxData) and (Level >= 0) do
|
while (p < MaxData) and (Level >= 0) do
|
||||||
begin
|
begin
|
||||||
p := Scope.Entry;
|
p := Scope.Entry;
|
||||||
p2:=p;
|
p2:=p;
|
||||||
@ -3949,7 +3949,9 @@ begin
|
|||||||
Scope.Index := ni; // GoNext
|
Scope.Index := ni; // GoNext
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (p > MaxData) then begin
|
if (p >= MaxData) then begin
|
||||||
|
if (p > MaxData) then
|
||||||
|
debugln(FPDBG_DWARF_WARNINGS, ['LocateEntry went past end of memory: ', p-MaxData]);
|
||||||
SetLength(FScopeList.List, FScopeList.HighestKnown + 1);
|
SetLength(FScopeList.List, FScopeList.HighestKnown + 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user