mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-28 16:30:59 +00:00
Do not try to interpret non-identifier tokens as pragma names.
This could access arbitrary memory locations, and could theoretically cause misbehavior including falsely recognizing the token as a pragma or accessing a softswitch/IO location.
This commit is contained in:
parent
81353a9f8a
commit
e0b27db652
@ -3328,6 +3328,11 @@ if ch in ['a','d','e','i','l','p','u','w'] then begin
|
||||
if token.name^ = 'pragma' then begin
|
||||
if tskipping then goto 2;
|
||||
NextToken;
|
||||
if token.class <> identifier then begin
|
||||
if (lint & lintPragmas) <> 0 then
|
||||
Error(110);
|
||||
goto 2;
|
||||
end; {if}
|
||||
if token.name^ = 'keep' then
|
||||
DoKeep
|
||||
else if token.name^ = 'debug' then begin
|
||||
|
Loading…
Reference in New Issue
Block a user