* 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:
yury 2014-11-12 14:52:56 +00:00
parent ce54992e07
commit c40960466a

View File

@ -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******************************}