Skip to content

Commit eb9b41a

Browse files
ihsinmeMathiasVP
andauthored
Apply suggestions from code review
Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
1 parent ed2a8db commit eb9b41a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-691/InsufficientControlFlowManagementWhenUsingBitOperations.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
22
* @name Errors When Using Bit Operations
3-
* @description --Using bitwise operations can be a mistake in some situations.
4-
* --For example, if parameters are evaluated in an expression and the function should be called only upon certain test results.
5-
* --These bitwise operations look suspicious and require developer attention.
3+
* @description Unlike the binary operations `||` and `&&`, there is no sequence point after evaluating an
4+
* operand of a bitwise operation like `|` or `&`. If left-to-right evaluation is expected this may be confusing.
65
* @kind problem
76
* @id cpp/errors-when-using-bit-operations
87
* @problem.severity warning
@@ -77,4 +76,4 @@ where
7776
not dbo.useInOtherCalls() and
7877
dbo.useInLogicalOperations() and
7978
(not dbo.functionCallsInBitsExpression() or dbo.dangerousArgumentChecking())
80-
select dbo, "this bit expression needs your attention"
79+
select dbo, "This bitwise operation appears in a context where a Boolean operation is expected."

0 commit comments

Comments
 (0)