...
It might be better to replace the pointer pst
with an auto_ptr
that automatically cleans up itself.
...
Risk Assessment
Memory and other resource leaks will eventually cause a program to crash. If an attacker can provoke repeated resource leaks by forcing an exception to be thrown through the submission of suitably crafted data, then the attacker can mount a denial-of-service attack.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level | |
---|---|---|---|---|---|---|
RES38-C | ||||||
Component | Value | |||||
Severity | 1 (low) | Likelihood | 2 (probable) Remediation cost | 1 (high) | P2 | L3 |
References
- Meyers 96 Item 9: "Use destructors to prevent resource leaks".