Skip to content

Commit 191efdf

Browse files
committed
replace getMethod("new").getReturn() with getInstance()
1 parent 5f826d0 commit 191efdf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/ql/lib/codeql/ruby/frameworks/core/Digest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ private class DigestCall extends Cryptography::CryptographicOperation::Range ins
2323
or
2424
this = digest(algo).getAMethodCall("file") // it's directly hashing the contents of a file, but that's close enough for us.
2525
or
26-
this = digest(algo).getMethod("new").getReturn().getAMethodCall(["digest", "update", "<<"])
26+
this = digest(algo).getInstance().getAMethodCall(["digest", "update", "<<"])
2727
}
2828

2929
override Cryptography::HashingAlgorithm getAlgorithm() { result = algo }

0 commit comments

Comments
 (0)