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

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

Test Case IDCandidate199263
Bad / Good / MixedBadBad test case
AuthorToyota ITC
Associations
Good pair: 199264  
Test suite: 104  
Added byCharles Oliveira
LanguageC
Type of test caseSource Code
Input string
Expected Output
Instructionsgcc -Wall -I ../../../shared/104 free_null_pointer.c free_null_pointer_main.c -lm -lpthread
Submission date2016-07-22
DescriptionDefect Type: Pointer related defects
Defect Sub-type: Free NULL pointer

The test case contains coincidental weaknesses along with intended ones as follows for file free_null_pointer.c:
* line(s): 54,74,109,144,146,151,241,275,281,282,320,452,483,530,531,532 CWE-476
* line(s): 102,124,167,195,215,231,257,306,328,445,481,514,544 CWE-561
* line(s): 369,375,381 CWE-591
* line(s): 418,420 CWE-587
* line(s): 419 CWE-465
File(s)
Flaw

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

File Contains:
CWE-561: Dead Code on line(s): 102, 124, 167, 195, 215, 231, 257, 306, 328, 445, 481, 514, 544
CWE-476: NULL Pointer Dereference on line(s): 54, 74, 109, 144, 146, 151, 241, 275, 281, 282, 320, 452, 483, 530, 531, 532
CWE-587: Assignment of a Fixed Address to a Pointer on line(s): 418, 420
CWE-465: Pointer Issues on line(s): 419
CWE-591: Sensitive Data Storage in Improperly Locked Memory on line(s): 369, 375, 381