Skip to content

Commit 2bd25da

Browse files
committed
Ruby: Tidy an exists
1 parent 62bc035 commit 2bd25da

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ruby/ql/lib/codeql/ruby/security/OpenSSL.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ private class CipherInstantiation extends CipherCallNode {
378378
private CipherMode cipherMode;
379379

380380
CipherInstantiation() {
381-
exists(string cipherName |
381+
exists(string cipherName | cipher.matchesName(cipherName) |
382382
// `OpenSSL::Cipher.new('<cipherName>')`
383383
this = cipherApi().getAnInstantiation() and
384384
cipherName = this.getStringArgument(0) and
@@ -436,8 +436,6 @@ private class CipherInstantiation extends CipherCallNode {
436436
cipherMode.isBlockMode(blockMode)
437437
)
438438
)
439-
|
440-
cipher.matchesName(cipherName)
441439
)
442440
}
443441

0 commit comments

Comments
 (0)