Skip to content

Commit 9e75f53

Browse files
committed
C++: Prefer matches to regexpMatch.
1 parent 9cdf838 commit 9e75f53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/semmle/code/cpp/security/Encryption.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ predicate isInsecureEncryption(string name) {
6868
*/
6969
bindingset[name]
7070
predicate isEncryptionAdditionalEvidence(string name) {
71-
name.toUpperCase().regexpMatch(".*(CRYPT|CODE|CODING|CBC|KEY).*")
71+
name.toUpperCase().matches("%" + ["CRYPT", "CODE", "CODING", "CBC", "KEY"] + "%")
7272
}
7373

7474
/**

0 commit comments

Comments
 (0)