mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
This commit is contained in:
@@ -58,7 +58,7 @@ class WrongCheckErrorOperatorNew extends FunctionCall {
|
||||
predicate isExistsIfCondition() {
|
||||
exists(IfCompareWithZero ifc, AssignExpr aex, Initializer it |
|
||||
// call `operator new` directly from the condition of `operator if`.
|
||||
this = ifc.getCondition().getAChild()
|
||||
this = ifc.getCondition().getAChild*()
|
||||
or
|
||||
// check results call `operator new` with variable appropriation
|
||||
postDominates(ifc, this) and
|
||||
|
||||
Reference in New Issue
Block a user