mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-30 05:11:29 +01:00
* prevent crash of h2pas if an unknown specifier is encountered, resolves #18664
git-svn-id: trunk@20136 -
This commit is contained in:
parent
a0b200db76
commit
d01824ab22
@ -1076,8 +1076,9 @@ program h2pas;
|
|||||||
hp3:=hp2^.p2;
|
hp3:=hp2^.p2;
|
||||||
while assigned(hp3) do
|
while assigned(hp3) do
|
||||||
begin
|
begin
|
||||||
if not assigned(hp3^.p1^.p3) or
|
if assigned(hp3^.p1) and
|
||||||
(hp3^.p1^.p3^.typ <> t_size_specifier) then
|
(not assigned(hp3^.p1^.p3) or
|
||||||
|
(hp3^.p1^.p3^.typ <> t_size_specifier)) then
|
||||||
begin
|
begin
|
||||||
if is_sized then
|
if is_sized then
|
||||||
begin
|
begin
|
||||||
@ -1097,7 +1098,8 @@ program h2pas;
|
|||||||
popshift;
|
popshift;
|
||||||
end;
|
end;
|
||||||
{ size specifier or default value ? }
|
{ size specifier or default value ? }
|
||||||
if assigned(hp3^.p1^.p3) then
|
if assigned(hp3^.p1) and
|
||||||
|
assigned(hp3^.p1^.p3) then
|
||||||
begin
|
begin
|
||||||
{ we could use mask to implement this }
|
{ we could use mask to implement this }
|
||||||
{ because we need to respect the positions }
|
{ because we need to respect the positions }
|
||||||
|
|||||||
@ -1072,8 +1072,9 @@ program h2pas;
|
|||||||
hp3:=hp2^.p2;
|
hp3:=hp2^.p2;
|
||||||
while assigned(hp3) do
|
while assigned(hp3) do
|
||||||
begin
|
begin
|
||||||
if not assigned(hp3^.p1^.p3) or
|
if assigned(hp3^.p1) and
|
||||||
(hp3^.p1^.p3^.typ <> t_size_specifier) then
|
(not assigned(hp3^.p1^.p3) or
|
||||||
|
(hp3^.p1^.p3^.typ <> t_size_specifier)) then
|
||||||
begin
|
begin
|
||||||
if is_sized then
|
if is_sized then
|
||||||
begin
|
begin
|
||||||
@ -1093,7 +1094,8 @@ program h2pas;
|
|||||||
popshift;
|
popshift;
|
||||||
end;
|
end;
|
||||||
{ size specifier or default value ? }
|
{ size specifier or default value ? }
|
||||||
if assigned(hp3^.p1^.p3) then
|
if assigned(hp3^.p1) and
|
||||||
|
assigned(hp3^.p1^.p3) then
|
||||||
begin
|
begin
|
||||||
{ we could use mask to implement this }
|
{ we could use mask to implement this }
|
||||||
{ because we need to respect the positions }
|
{ because we need to respect the positions }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user