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