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 4b02f88 commit 9907f0fCopy full SHA for 9907f0f
cpp/ql/src/Security/CWE/CWE-416/UseOfUniquePointerAfterLifetimeEnds.ql
@@ -30,7 +30,8 @@ where
30
outlivesFullExpr(c) and
31
not c.isFromUninstantiatedTemplate(_) and
32
isUniquePointerDerefFunction(c.getTarget()) and
33
- not c.getActualType() instanceof BoolType and
+ // Exclude cases where the pointer is implicitly converted to a non-pointer type
34
+ not c.getActualType() instanceof IntegralType and
35
isTemporary(c.getQualifier().getFullyConverted())
36
select c,
37
"The underlying unique pointer object is destroyed after the call to '" + c.getTarget() +
0 commit comments