mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Altering ordering for exists statement to be clearer.
This commit is contained in:
@@ -36,13 +36,11 @@ Type getABaseType(Type t) {
|
||||
*/
|
||||
class UnlikelyToBeAStringType extends Type {
|
||||
UnlikelyToBeAStringType() {
|
||||
exists(Type targ |
|
||||
// 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
|
||||
// char types. Assuming these are used for buffers, not strings.
|
||||
targ.(CharType).getName().toLowerCase().matches(["unsigned%"]) or
|
||||
targ.getName().toLowerCase().matches(["uint8_t", "%byte%"])
|
||||
|
|
||||
getABaseType(this) = targ
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user