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

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

Test Case IDCandidate199268
Bad / Good / MixedGoodGood test case
AuthorToyota ITC
Associations
Bad pair: 199267  
Test suite: 104  
Added byCharles Oliveira
LanguageC
Type of test caseSource Code
Input string
Expected Output
Instructionsgcc -Wall -I ../../../shared/104 function_return_value_unchecked.c function_return_value_unchecked_main.c -lm -lpthread
Submission date2016-07-22
DescriptionDefect Type: Inappropriate code
Defect Sub-type: Return value of function never checked
Description: Defect Free Code to identify false positives of return value not checked scenarios

The test case contains coincidental weaknesses along with intended ones as follows for file function_return_value_unchecked.c:
* line(s): 129,134,141,279,284,289,316,410 CWE-561
* line(s): 164,435 CWE-562
* line(s): 444 CWE-672
File(s)
Flaw

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

File Contains:
CWE-672: Operation on a Resource after Expiration or Release on line(s): 444
CWE-252: Unchecked Return Value on line(s): 48, 70, 87, 117, 172, 211, 238, 256, 294, 310, 334, 349, 370, 386, 403, 443
CWE-562: Return of Stack Variable Address on line(s): 164, 435
CWE-561: Dead Code on line(s): 129, 134, 141, 279, 284, 289, 316, 410