mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
spelling: arithmetic
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -192,7 +192,7 @@ class Operation extends Expr, @op_expr {
|
||||
}
|
||||
|
||||
/**
|
||||
* A unary operation. Either a unary arithemtic operation
|
||||
* A unary operation. Either a unary arithmetic operation
|
||||
* (`UnaryArithmeticOperation`), a unary bitwise operation
|
||||
* (`UnaryBitwiseOperation`), a `sizeof` operation (`SizeofExpr`), a pointer
|
||||
* indirection operation (`PointerIndirectionExpr`), an address-of operation
|
||||
@@ -206,7 +206,7 @@ class UnaryOperation extends Operation, @un_op {
|
||||
}
|
||||
|
||||
/**
|
||||
* A binary operation. Either a binary arithemtic operation
|
||||
* A binary operation. Either a binary arithmetic operation
|
||||
* (`BinaryArithmeticOperation`), a binary bitwise operation
|
||||
* (`BinaryBitwiseOperation`), a comparison operation (`ComparisonOperation`),
|
||||
* or a binary logical operation (`BinaryLogicalOperation`).
|
||||
|
||||
@@ -61,7 +61,7 @@ class DateTimeStruct extends Struct {
|
||||
/**
|
||||
* holds if the Callable is used for DateTime arithmetic operations
|
||||
*/
|
||||
Callable getATimeSpanArtithmeticCallable() {
|
||||
Callable getATimeSpanArithmeticCallable() {
|
||||
(result = this.getAnOperator() or result = this.getAMethod()) and
|
||||
result.getName() in [
|
||||
"Add", "AddDays", "AddHours", "AddMilliseconds", "AddMinutes", "AddMonths", "AddSeconds",
|
||||
@@ -96,7 +96,7 @@ private class FlowsFromGetLastWriteTimeConfigToTimeSpanArithmeticCallable extend
|
||||
override predicate isSink(DataFlow::Node sink) {
|
||||
exists(Call call, DateTimeStruct dateTime |
|
||||
call.getAChild*() = sink.asExpr() and
|
||||
call = dateTime.getATimeSpanArtithmeticCallable().getACall()
|
||||
call = dateTime.getATimeSpanArithmeticCallable().getACall()
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -111,7 +111,7 @@ private class FlowsFromTimeSpanArithmeticToTimeComparisonCallable extends TaintT
|
||||
|
||||
override predicate isSource(DataFlow::Node source) {
|
||||
exists(DateTimeStruct dateTime, Call call | source.asExpr() = call |
|
||||
call = dateTime.getATimeSpanArtithmeticCallable().getACall()
|
||||
call = dateTime.getATimeSpanArithmeticCallable().getACall()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ predicate isPotentialTimeBomb(
|
||||
|
|
||||
pathSource.getNode() = exprNode(getLastWriteTimeMethodCall) and
|
||||
config1.hasFlow(exprNode(getLastWriteTimeMethodCall), sink) and
|
||||
timeArithmeticCall = dateTime.getATimeSpanArtithmeticCallable().getACall() and
|
||||
timeArithmeticCall = dateTime.getATimeSpanArithmeticCallable().getACall() and
|
||||
timeArithmeticCall.getAChild*() = sink.asExpr() and
|
||||
config2.hasFlow(exprNode(timeArithmeticCall), sink2) and
|
||||
timeComparisonCall = dateTime.getAComparisonCallable().getACall() and
|
||||
|
||||
Reference in New Issue
Block a user