Skip to content

Commit 9b04b42

Browse files
committed
A leap year check sink can be a ExprCheckLeapYear component.
1 parent 9b7f986 commit 9b04b42

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModificationPrecise.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ module OperationToYearAssignmentConfig implements DataFlow::ConfigSig {
293293
module OperationToYearAssignmentFlow = TaintTracking::Global<OperationToYearAssignmentConfig>;
294294

295295
predicate isLeapYearCheckSink(DataFlow::Node sink) {
296+
exists(ExprCheckLeapYear e | sink.asExpr() = e.getAChild*())
297+
or
296298
// Local leap year check
297299
sink.asExpr().(LeapYearFieldAccess).isUsedInCorrectLeapYearCheck()
298300
or

0 commit comments

Comments
 (0)