Skip to content

Commit 84a61d1

Browse files
committed
C++: No need for 'matches'.
1 parent 2931e5d commit 84a61d1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ class SqliteFunctionExecCall extends SqliteFunctionCall {
3434

3535
class SqliteFunctionAppendfCall extends SqliteFunctionCall {
3636
SqliteFunctionAppendfCall() {
37-
this.getTarget().getName().matches(["sqlite3_str_appendf", "sqlite3_str_vappendf"])
37+
this.getTarget().hasName(["sqlite3_str_appendf", "sqlite3_str_vappendf"])
3838
}
3939

4040
override Expr getASource() { result = this.getArgument(any(int n | n > 0)) }
4141
}
4242

4343
class SqliteFunctionAppendNonCharCall extends SqliteFunctionCall {
4444
SqliteFunctionAppendNonCharCall() {
45-
this.getTarget().getName().matches(["sqlite3_str_append", "sqlite3_str_appendall"])
45+
this.getTarget().hasName(["sqlite3_str_append", "sqlite3_str_appendall"])
4646
}
4747

4848
override Expr getASource() { result = this.getArgument(1) }
@@ -57,8 +57,7 @@ class SqliteFunctionAppendCharCall extends SqliteFunctionCall {
5757
class SqliteFunctionBindCall extends SqliteFunctionCall {
5858
SqliteFunctionBindCall() {
5959
this.getTarget()
60-
.getName()
61-
.matches([
60+
.hasName([
6261
"sqlite3_bind_blob", "sqlite3_bind_blob64", "sqlite3_bind_text", "sqlite3_bind_text16",
6362
"sqlite3_bind_text64", "sqlite3_bind_value", "sqlite3_bind_pointer"
6463
])

0 commit comments

Comments
 (0)