mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-17 04:00:56 +01:00
* More correctly scan Elf Auxiliary Vector. Fixes possible crash when the first vector entry is AT_NULL. Issue #26973.
git-svn-id: trunk@29065 -
This commit is contained in:
parent
ce54992e07
commit
c40960466a
@ -62,7 +62,8 @@ begin
|
|||||||
|
|
||||||
auxv := PElf32AuxiliaryVector(ep);
|
auxv := PElf32AuxiliaryVector(ep);
|
||||||
|
|
||||||
repeat
|
while auxv^.a_type <> AT_NULL do
|
||||||
|
begin
|
||||||
if auxv^.a_type = AT_SYSINFO then begin
|
if auxv^.a_type = AT_SYSINFO then begin
|
||||||
psysinfo := auxv^.a_un.a_val;
|
psysinfo := auxv^.a_un.a_val;
|
||||||
if psysinfo <> 0 then
|
if psysinfo <> 0 then
|
||||||
@ -70,7 +71,7 @@ begin
|
|||||||
Break;
|
Break;
|
||||||
end;
|
end;
|
||||||
Inc(auxv);
|
Inc(auxv);
|
||||||
until auxv^.a_type = AT_NULL;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{***********************SYSENTER CODE END******************************}
|
{***********************SYSENTER CODE END******************************}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user