mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Merge pull request #682 from geoffw0/suspiciousaddsizeof
CPP: Fix false positive in SuspiciousAddWithSizeof.ql
This commit is contained in:
@@ -15,9 +15,9 @@ import IncorrectPointerScalingCommon
|
||||
|
||||
private predicate isCharSzPtrExpr(Expr e) {
|
||||
exists (PointerType pt
|
||||
| pt = e.getFullyConverted().getUnderlyingType()
|
||||
| pt.getBaseType().getUnspecifiedType() instanceof CharType
|
||||
or pt.getBaseType().getUnspecifiedType() instanceof VoidType)
|
||||
| pt = e.getFullyConverted().getType().getUnspecifiedType()
|
||||
| pt.getBaseType() instanceof CharType
|
||||
or pt.getBaseType() instanceof VoidType)
|
||||
}
|
||||
|
||||
from Expr sizeofExpr, Expr e
|
||||
|
||||
Reference in New Issue
Block a user