mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: qlformat
This commit is contained in:
@@ -28,7 +28,8 @@ where
|
||||
// If we see an addWithSizeof then we expect the type of
|
||||
// the pointer expression to be `char*` or `void*`. Otherwise it
|
||||
// is probably a mistake.
|
||||
addWithSizeof(e, sizeofExpr, _) and not isCharSzPtrExpr(e)
|
||||
addWithSizeof(e, sizeofExpr, _) and
|
||||
not isCharSzPtrExpr(e)
|
||||
select sizeofExpr,
|
||||
"Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@.",
|
||||
e.getFullyConverted().getType() as t, t.toString()
|
||||
|
||||
Reference in New Issue
Block a user