Skip to content

Commit 0fa70db

Browse files
Review suggestions - update comment and introduce manual magic to filelocalflow
1 parent a46c157 commit 0fa70db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ql/src/Resources/FileNotAlwaysClosedQuery.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class FileWrapperCall extends DataFlow::CallCfgNode {
5050

5151
/** A node where a file is closed. */
5252
abstract class FileClose extends DataFlow::CfgNode {
53-
/** Holds if this file close will occur if an exception is thrown at `e`. */
53+
/** Holds if this file close will occur if an exception is thrown at `raises`. */
5454
predicate guardsExceptions(DataFlow::CfgNode raises) {
5555
this.asCfgNode() = raises.asCfgNode().getAnExceptionalSuccessor().getASuccessor*()
5656
or
@@ -91,7 +91,7 @@ private predicate fileLocalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node node
9191
}
9292

9393
/** Holds if data flows from `source` to `sink`, including file wrapper classes. */
94-
private predicate fileLocalFlow(DataFlow::Node source, DataFlow::Node sink) {
94+
private predicate fileLocalFlow(FileOpen source, DataFlow::Node sink) {
9595
fileLocalFlowStep*(source, sink)
9696
}
9797

0 commit comments

Comments
 (0)