Skip to content

Commit ba3a4fb

Browse files
committed
Rename filesystemStore predicate after d9e6e5a
1 parent 500deac commit ba3a4fb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

java/ql/lib/semmle/code/java/security/CleartextStorageAndroidFilesystemQuery.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class LocalFileOpenCall extends Storable {
3333

3434
override Expr getAStore() {
3535
exists(FilesystemFlowConfig conf, DataFlow::Node n |
36-
filesystemStore(n, result) and
36+
closesFile(n, result) and
3737
conf.hasFlow(DataFlow::exprNode(this), n)
3838
)
3939
}
@@ -57,14 +57,14 @@ private predicate isVarargs(Argument arg, DataFlow::ImplicitVarargsArray varargs
5757

5858
/** Holds if `store` closes `file`. */
5959
private predicate closesFile(DataFlow::Node file, Call closeCall) {
60-
store.getCallee() instanceof CloseFileMethod and
61-
if store.getCallee().isStatic()
62-
then file.asExpr() = store
63-
else file.asExpr() = store.getQualifier()
60+
closeCall.getCallee() instanceof CloseFileMethod and
61+
if closeCall.getCallee().isStatic()
62+
then file.asExpr() = closeCall
63+
else file.asExpr() = closeCall.getQualifier()
6464
or
6565
// try-with-resources automatically closes the file
66-
any(TryStmt try).getAResource() = store.(LocalFileOpenCall).getEnclosingStmt() and
67-
store = file.asExpr()
66+
any(TryStmt try).getAResource() = closeCall.(LocalFileOpenCall).getEnclosingStmt() and
67+
closeCall = file.asExpr()
6868
}
6969

7070
/** A method that closes a file, perhaps after writing some data. */
@@ -87,7 +87,7 @@ private class FilesystemFlowConfig extends DataFlow::Configuration {
8787

8888
override predicate isSink(DataFlow::Node sink) {
8989
filesystemInput(sink, _) or
90-
filesystemStore(sink, _)
90+
closesFile(sink, _)
9191
}
9292

9393
override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {

0 commit comments

Comments
 (0)