From dfe6ed2171f872c8760e5ca789500523dabac8d4 Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 10:09:25 -0500 Subject: [PATCH 1/5] Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 5ebd8af4392..0273440a49f 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -106,8 +106,7 @@ class IgnorableExpr10MultipleComponent extends IgnorableOperation { } /** - * An operation involving a sub expression with char literal 48, ignore as a likely string conversion - * e.g., X - '0' + * An operation involving a sub expression with char literal `48`, ignore as a likely string conversion. For example: `X - '0'` */ class IgnorableExpr48Mapping extends IgnorableOperation { IgnorableExpr48Mapping() { From b39732ba02c515f6223ac528853cc878b9a8ad6f Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 10:10:11 -0500 Subject: [PATCH 2/5] Update cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 0273440a49f..d22a6b5e557 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -207,7 +207,7 @@ class OperationAsArgToIgnorableFunction extends IgnorableOperation { } /** - * A Literal OP literal means the result is constant/known + * A binary operation on two literals means the result is constant/known * and the operation is basically ignorable (it's not a real operation but * probably one visual simplicity what it means). */ From f5a38b47015d929477324ea1844f3f5213c047a7 Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 10:17:56 -0500 Subject: [PATCH 3/5] Apply suggestion from @geoffw0 Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index d22a6b5e557..03236397979 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -266,7 +266,7 @@ class IgnorablePointerOrCharArithmetic extends IgnorableOperation { } /** - * Holds for an expression that is a operation that could flow to a Year field. + * Holds for an expression that is an add or similar operation that could flow to a Year field. */ predicate isOperationSourceCandidate(Expr e) { not e instanceof IgnorableOperation and From 36e4efe77e55c237be39dbe2ea79ab0d190b8588 Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 10:20:32 -0500 Subject: [PATCH 4/5] Apply suggestion from @geoffw0 Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 03236397979..1d8b92a85d3 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -354,7 +354,7 @@ class YearFieldAssignmentNode extends DataFlow::Node { } /** - * A DataFlow configuration for identifying flows from some non trivial access or literal + * A DataFlow configuration for identifying flows from an identified source * to the Year field of a date object. */ module OperationToYearAssignmentConfig implements DataFlow::ConfigSig { From 9bbbbefd34116b220dd345d77e345861373cda50 Mon Sep 17 00:00:00 2001 From: Ben Rodes Date: Thu, 12 Feb 2026 10:20:59 -0500 Subject: [PATCH 5/5] Apply suggestion from @geoffw0 Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com> --- .../Leap Year/UncheckedLeapYearAfterYearModification.ql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql index 1d8b92a85d3..21310ab2048 100644 --- a/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql +++ b/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql @@ -288,7 +288,7 @@ predicate isOperationSourceCandidate(Expr e) { } /** - * A dataflow that tracks an ignorable operation (eg. bitwise op) to a operation source, so we may disqualify it. + * A data flow that tracks an ignorable operation (such as a bitwise operation) to an operation source, so we may disqualify it. */ module IgnorableOperationToOperationSourceCandidateConfig implements DataFlow::ConfigSig { predicate isSource(DataFlow::Node n) { n.asExpr() instanceof IgnorableOperation }