Terminate PCH generation if an #append is encountered.

If the appended file was another C file and that file contained an #include, this would create an invalid record in the sym file. It would record memory from the buffer holding the original file to the buffer holding the appended file. In general, these are not contiguous, so superfluous data from other parts of memory would be included in the sym file. This record would normally just be treated as invalid on subsequent compiles, but it could theoretically be very large (depending on the memory layout) and might contain sensitive data from other parts of memory.
This commit is contained in:
Stephen Heumann 2022-02-19 14:05:07 -06:00
parent 1e98a63bf4
commit a73dce103b
1 changed files with 1 additions and 0 deletions

View File

@ -2316,6 +2316,7 @@ var
tbool: boolean; {temp boolean}
begin {DoAppend}
TermHeader;
tbool := OpenFile(false, false); {open a new file and proceed from there}
lineNumber := 1;
end; {DoAppend}