C++: Fix the issue.

This commit is contained in:
Geoffrey White
2026-03-19 13:16:16 +00:00
parent 2e987f8d78
commit 0f794b57ed
3 changed files with 5 additions and 7 deletions

View File

@@ -18,7 +18,8 @@ import IncorrectPointerScalingCommon
private predicate isCharSzPtrExpr(Expr e) {
exists(PointerType pt | pt = e.getFullyConverted().getUnspecifiedType() |
pt.getBaseType() instanceof CharType or
pt.getBaseType() instanceof VoidType
pt.getBaseType() instanceof VoidType or
pt.getBaseType() instanceof ErroneousType // this could be char / void type in a successful compilation
)
}