Skip to content

Commit fa33730

Browse files
Add APIs to ExtendedDeprecatedApis for Codeql port of c28727 (#163)
add apis from C28727
1 parent c7f9de9 commit fa33730

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/drivers/general/queries/ExtendedDeprecatedApis/ExtendedDeprecatedApis.ql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ predicate matchesBannedApi(string input) {
7272
or
7373
// Functions marked deprecated in C28750
7474
input = any(["lstrlen", "lstrlenA", "lstrlenW"])
75+
or
76+
// Functions marked deprecated in C28727
77+
input = any(["_itow", "_ultow", "strtok", "swscanf", "wcstok"])
7578
}
7679

7780
/** A deprecated API. */
@@ -449,6 +452,20 @@ class ExtendedDeprecatedCall extends Element {
449452
or
450453
name.matches("lstrlenW") and replacement = "wcslen"
451454
)
455+
456+
or
457+
// Functions marked deprecated in C28727
458+
(
459+
name.matches("_itow") and replacement = "None"
460+
or
461+
name.matches("_ultow") and replacement = "None"
462+
or
463+
name.matches("strtok") and replacement = "None"
464+
or
465+
name.matches("swscanf") and replacement = "None"
466+
or
467+
name.matches("wcstok") and replacement = "None"
468+
)
452469
)
453470
}
454471

0 commit comments

Comments
 (0)