Fix invalid memory access due to uninitialized pointer.

(From Kelvin Sherlock.)
This commit is contained in:
Stephen Heumann 2016-10-03 00:21:51 -05:00
parent dce39a851e
commit e00d47aaaf
1 changed files with 1 additions and 0 deletions

View File

@ -1498,6 +1498,7 @@ var
begin {ResolveForwardReference}
iPtr^.isForwardDeclared := false; {we will succeeed or flag an error...}
tPtr := iPtr^.itype; {skip to the struct/union type}
lPtr := tPtr; {initialize it here -- kws}
while tPtr^.kind in [pointerType,arrayType,functionType,definedType] do begin
lPtr := tPtr;
tPtr := tPtr^.pType;