Skip to content

Commit 05d693e

Browse files
committed
C++: Also include the assignment versions in exprThatCanOverflow.
1 parent 0e7eeb3 commit 05d693e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/ql/src/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,7 +1626,9 @@ private module SimpleRangeAnalysisCached {
16261626
private predicate exprThatCanOverflow(Expr e) {
16271627
e instanceof UnaryArithmeticOperation or
16281628
e instanceof BinaryArithmeticOperation or
1629-
e instanceof LShiftExpr
1629+
e instanceof AssignArithmeticOperation or
1630+
e instanceof LShiftExpr or
1631+
e instanceof AssignLShiftExpr
16301632
}
16311633

16321634
/**

0 commit comments

Comments
 (0)