SAMATE Logo NIST Logo The SAMATE Project Department of Homeland Security
Downloads:  Download this Test Case #199262

Back to the previous page... Back to the previous page

Test Case IDCandidate199262
Bad / Good / MixedGoodGood test case
AuthorToyota ITC
Associations
Bad pair: 199261  
Test suite: 104  
Added byCharles Oliveira
LanguageC
Type of test caseSource Code
Input string
Expected Output
Instructionsgcc -Wall -I ../../../shared/104 free_nondynamic_allocated_memory.c free_nondynamic_allocated_memory_main.c -lm -lpthread
Submission date2016-07-22
DescriptionDefect Type: Resource management defects
Defect Sub-type: Free non dynamically allocated memory
Description: Defect Free Code to identify false positives while freeing non dynamically allocated memory

The test case contains coincidental weaknesses along with intended ones as follows for file free_nondynamic_allocated_memory.c:
* line(s): 23,35,61,114,127,140,169,187 CWE-561
* line(s): 81,208 CWE-476
File(s)
Flaw

There are no comments
Have any comments on this test case? Please, .

File Contains:
CWE-590: Free of Memory not on the Heap on line(s): 22, 35, 47, 61, 84, 103, 114, 127, 141, 154, 170, 187, 209, 228, 238, 261
CWE-476: NULL Pointer Dereference on line(s): 81, 208
CWE-561: Dead Code on line(s): 23, 35, 61, 114, 127, 140, 169, 187