Skip to content

Commit 7015be7

Browse files
authored
Merge pull request github#6916 from geoffw0/fixnotbound
C++: Fix unbound variables in PrivateCleartextWrite.qll.
2 parents 12d7f0c + 38257a5 commit 7015be7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

cpp/ql/lib/experimental/semmle/code/cpp/security/PrivateCleartextWrite.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,8 @@ module PrivateCleartextWrite {
5252

5353
class WriteSink extends Sink {
5454
WriteSink() {
55-
exists(FileWrite f, BufferWrite b |
56-
this.asExpr() = f.getASource()
57-
or
58-
this.asExpr() = b.getAChild()
59-
)
55+
this.asExpr() = any(FileWrite f).getASource() or
56+
this.asExpr() = any(BufferWrite b).getAChild()
6057
}
6158
}
6259
}

0 commit comments

Comments
 (0)