Skip to content

Commit ca18179

Browse files
committed
C++: Correct false positive. Only TimeConversionFunction that do not auto correct for leap year should be considered.
1 parent d9feadc commit ca18179

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class SafeTimeGatheringFunction extends Function {
4646

4747
from FunctionCall fcall, TimeConversionFunction trf, Variable var
4848
where
49+
not trf.isAutoLeapYearCorrecting() and
4950
fcall = trf.getACallToThisFunction() and
5051
fcall instanceof ExprInVoidContext and
5152
var.getUnderlyingType() instanceof UnpackedTimeType and

0 commit comments

Comments
 (0)