mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-11 13:11:31 +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,15 +62,16 @@ begin
|
|||||||
|
|
||||||
auxv := PElf32AuxiliaryVector(ep);
|
auxv := PElf32AuxiliaryVector(ep);
|
||||||
|
|
||||||
repeat
|
while auxv^.a_type <> AT_NULL do
|
||||||
if auxv^.a_type = AT_SYSINFO then begin
|
begin
|
||||||
psysinfo := auxv^.a_un.a_val;
|
if auxv^.a_type = AT_SYSINFO then begin
|
||||||
if psysinfo <> 0 then
|
psysinfo := auxv^.a_un.a_val;
|
||||||
sysenter_supported := 1; // descision factor in asm syscall routines
|
if psysinfo <> 0 then
|
||||||
Break;
|
sysenter_supported := 1; // descision factor in asm syscall routines
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
Inc(auxv);
|
||||||
end;
|
end;
|
||||||
Inc(auxv);
|
|
||||||
until auxv^.a_type = AT_NULL;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{***********************SYSENTER CODE END******************************}
|
{***********************SYSENTER CODE END******************************}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user