Description
Defect Type: Resource management defects
Defect Sub-type: Memory allocation failure
Description: memory_allocation_failure - Memory could not be allocated / insufficient memory
Created on: Oct 14, 2013
Author: hemalatha
The test case contains coincidental weaknesses along with intended ones as follows for file memory_allocation_failure.c:
* line(s): 39 CWE-190
* line(s): 39,221,283,322 CWE-835
* line(s): 41,219,267,281,320 CWE-401
* line(s): 56,75,103,214,257,261,282,321,384,522,635 CWE-197
* line(s): 81,83,181,182,199,201,202,329,332,333,335,337,343,385,386,396,398,432,486,494,499,509,572,593,657,706 CWE-476
* line(s): 222 CWE-121
* line(s): 335,441,442,477,492,497,503,559,576,597,610,696 CWE-561
* line(s): 442,447 CWE-825
* line(s): 704,705 CWE-789
Flaws
- CWE-121 Stack-based Buffer Overflow
- CWE-190 Integer Overflow or Wraparound
- CWE-401 Missing Release of Memory after Effective Lifetime
- CWE-789 Memory Allocation with Excessive Size Value
- CWE-197 Numeric Truncation Error
- CWE-476 NULL Pointer Dereference
- CWE-561 Dead Code
- CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
- CWE-825 Expired Pointer Dereference
Test Suites
Have any comments on this test case? Please, send us an email.