We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51e787b commit 31324fcCopy full SHA for 31324fc
cpp/ql/src/Security/CWE/CWE-704/WcharCharConversion.ql
@@ -36,13 +36,11 @@ Type getABaseType(Type t) {
36
*/
37
class UnlikelyToBeAStringType extends Type {
38
UnlikelyToBeAStringType() {
39
- exists(Type targ |
40
- // NOTE: not using CharType isUnsigned, but rather look for any explicitly declared unsigned
+ exists(Type targ | getABaseType(this) = targ |
+ // NOTE: not using CharType isUnsigned, but rather look for any explicitly declared unsigned
41
// char types. Assuming these are used for buffers, not strings.
42
targ.(CharType).getName().toLowerCase().matches(["unsigned%"]) or
43
targ.getName().toLowerCase().matches(["uint8_t", "%byte%"])
44
- |
45
- getABaseType(this) = targ
46
)
47
}
48
0 commit comments