You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

If you overload operator new in global scope, you should also overload operator delete in global scope. Likewise, overloading operator new in the scope of a class mandates the overloading of operator delete in the same class. Failure to overload operator delete will cause the global delete to be called to release a resource that was allocated with an overloaded operator new. Violation of this rule is likely to also violate MEM39-CPP. Object and array delete must be properly paired with the corresponding new

Risk Assessment

Mismatched usage of new and delete could lead to a denial-of-service attack.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

DCL35-CPP

1 (low)

1 (unlikely)

3 (low)

P3

L3

  • No labels