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

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

Test Case IDCandidate199328
Bad / Good / MixedGoodGood test case
AuthorToyota ITC
Bad pair: 199327  
Test suite: 104  
Added byCharles Oliveira
Type of test caseSource Code
Input string
Expected Output
Instructionsgcc -Wall -I ../../../shared/104 wrong_arguments_func_pointer.c wrong_arguments_func_pointer_main.c -lm -lpthread
Submission date2016-07-22
DescriptionDefect Type: Pointer related defects
Defect Sub-type: Comparison NULL with function pointer
Description: Defect Free Code to identify false positives to identify the wrong arguments fed into a function pointer
Created on: Oct 8, 2013
Author: hemalatha

The test case contains coincidental weaknesses along with intended ones as follows for file wrong_arguments_func_pointer.c:
* line(s): 434,446,457,458,587 CWE-476
* line(s): 518 CWE-561

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

File Contains:
CWE-476: NULL Pointer Dereference on line(s): 434, 446, 457, 458, 587
CWE-686: Function Call With Incorrect Argument Type on line(s): 52, 73, 93, 113, 138, 223, 252, 297, 350, 379, 419, 486, 524
CWE-561: Dead Code on line(s): 518
CWE-685: Function Call With Incorrect Number of Arguments on line(s): 157, 177, 452
CWE-628: Function Call with Incorrectly Specified Arguments on line(s): 196