Skip to content

Commit 8f9a73e

Browse files
committed
C++: Address review comments
1 parent 33fa76f commit 8f9a73e

File tree

1 file changed

+2
-6
lines changed
  • cpp/ql/lib/semmle/code/cpp/models/implementations

1 file changed

+2
-6
lines changed

cpp/ql/lib/semmle/code/cpp/models/implementations/Scanf.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ abstract private class ScanfFunctionModel extends ArrayFunction, TaintFunction,
7171
/**
7272
* The standard function `scanf` and its assorted variants
7373
*/
74-
private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction {
75-
ScanfModel() { this instanceof Scanf }
76-
74+
private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction instanceof Scanf {
7775
override predicate hasLocalFlowSource(FunctionOutput output, string description) {
7876
output.isParameterDeref(any(int i | i >= this.getArgsStartPosition())) and
7977
description = "Value read by " + this.getName()
@@ -83,9 +81,7 @@ private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction {
8381
/**
8482
* The standard function `fscanf` and its assorted variants
8583
*/
86-
private class FscanfModel extends ScanfFunctionModel, RemoteFlowSourceFunction {
87-
FscanfModel() { this instanceof Fscanf }
88-
84+
private class FscanfModel extends ScanfFunctionModel, RemoteFlowSourceFunction instanceof Fscanf {
8985
override predicate hasRemoteFlowSource(FunctionOutput output, string description) {
9086
output.isParameterDeref(any(int i | i >= this.getArgsStartPosition())) and
9187
description = "Value read by " + this.getName()

0 commit comments

Comments
 (0)