mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
C++: Address review comments
This commit is contained in:
@@ -71,9 +71,7 @@ abstract private class ScanfFunctionModel extends ArrayFunction, TaintFunction,
|
||||
/**
|
||||
* The standard function `scanf` and its assorted variants
|
||||
*/
|
||||
private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction {
|
||||
ScanfModel() { this instanceof Scanf }
|
||||
|
||||
private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction instanceof Scanf {
|
||||
override predicate hasLocalFlowSource(FunctionOutput output, string description) {
|
||||
output.isParameterDeref(any(int i | i >= this.getArgsStartPosition())) and
|
||||
description = "Value read by " + this.getName()
|
||||
@@ -83,9 +81,7 @@ private class ScanfModel extends ScanfFunctionModel, LocalFlowSourceFunction {
|
||||
/**
|
||||
* The standard function `fscanf` and its assorted variants
|
||||
*/
|
||||
private class FscanfModel extends ScanfFunctionModel, RemoteFlowSourceFunction {
|
||||
FscanfModel() { this instanceof Fscanf }
|
||||
|
||||
private class FscanfModel extends ScanfFunctionModel, RemoteFlowSourceFunction instanceof Fscanf {
|
||||
override predicate hasRemoteFlowSource(FunctionOutput output, string description) {
|
||||
output.isParameterDeref(any(int i | i >= this.getArgsStartPosition())) and
|
||||
description = "Value read by " + this.getName()
|
||||
|
||||
Reference in New Issue
Block a user