Skip to content

Commit e6630a8

Browse files
rdmarsh2jbj
andauthored
Apply suggestions from code review
Co-Authored-By: Jonas Jensen <[email protected]>
1 parent d0e0471 commit e6630a8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cpp/ql/src/semmle/code/cpp/security/FlowSources.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import semmle.code.cpp.models.interfaces.FlowSource
1111
abstract class RemoteFlowSource extends DataFlow::Node {
1212
}
1313

14-
class FileDescriptorTaintedReturnSource extends RemoteFlowSource {
15-
FileDescriptorTaintedReturnSource() {
14+
private class TaintedReturnSource extends RemoteFlowSource {
15+
TaintedReturnSource() {
1616
exists(RemoteFlowFunction func, CallInstruction instr, FunctionOutput output |
1717
asInstruction() = instr and
1818
instr.getStaticCallTarget() = func and
@@ -22,14 +22,13 @@ class FileDescriptorTaintedReturnSource extends RemoteFlowSource {
2222
}
2323
}
2424

25-
class FileTaintedParameterSource extends RemoteFlowSource {
26-
FileTaintedParameterSource() {
27-
exists(RemoteFlowFunction func, ReadSideEffectInstruction instr, FunctionOutput output |
25+
private class TaintedParameterSource extends RemoteFlowSource {
26+
TaintedParameterSource() {
27+
exists(RemoteFlowFunction func, WriteSideEffectInstruction instr, FunctionOutput output |
2828
asInstruction() = instr and
2929
instr.getPrimaryInstruction().(CallInstruction).getStaticCallTarget() = func and
3030
func.hasFlowSource(output) and
3131
output.isParameterDeref(instr.getIndex())
3232
)
3333
}
3434
}
35-

0 commit comments

Comments
 (0)