Skip to content

Commit c6b48c3

Browse files
committed
updated comment.
1 parent 5262824 commit c6b48c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/src/Microsoft/Likely Bugs/SizeOfMisuse/SizeOfConstIntMacro.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ predicate isSizeOfExprOperandMacroInvocationAConstInteger(
5353
// Special case for token pasting operator
5454
not exists(Macro m | m = mi.getMacro() | m.getBody().toString().regexpMatch("^.*\\s*##\\s*.*$")) and
5555
// Special case for multichar literal integers that are exactly 4 character long (i.e. 'val1')
56+
// in these cases, the precompiler turns the string value into an integer, making it appear to be
57+
// a const macro of interest, but strings should be ignored.
5658
not exists(Macro m | m = mi.getMacro() | m.getBody().toString().regexpMatch("^'.{4}'$")) and
5759
// Special case macros that are known to be used in buffer streams
5860
// where it is common index into a buffer or allocate a buffer size based on a constant

0 commit comments

Comments
 (0)