From a73dce103bc452e2a022cd20ed78b042648cb140 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 19 Feb 2022 14:05:07 -0600 Subject: [PATCH] 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. --- Scanner.pas | 1 + 1 file changed, 1 insertion(+) diff --git a/Scanner.pas b/Scanner.pas index 9e319e4..0fb6029 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -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}