mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-06 15:35:39 +00:00
Skip initializer processing for flexible array members.
This could result in null pointer dereferences.
This commit is contained in:
parent
cb063afa47
commit
4db26d14bd
@ -3940,6 +3940,8 @@ var
|
||||
2: end;
|
||||
|
||||
arrayType: begin
|
||||
elements := itype^.elements;
|
||||
if elements = 0 then goto 1; {don't init flexible array member}
|
||||
if itype^.aType^.kind = scalarType then
|
||||
if itype^.aType^.baseType in [cgByte,cgUByte] then
|
||||
if iPtr^.iTree^.token.kind = stringConst then begin
|
||||
@ -3955,7 +3957,6 @@ var
|
||||
iPtr := iPtr^.next;
|
||||
goto 1;
|
||||
end; {if}
|
||||
elements := itype^.elements;
|
||||
itype := itype^.atype;
|
||||
if ZeroFill(elements, itype, count, iPtr) then begin
|
||||
if itype^.kind = enumType then
|
||||
|
Loading…
Reference in New Issue
Block a user