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

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

Test Case IDCandidate199327
Bad / Good / MixedBadBad test case
AuthorToyota ITC
Associations
Good pair: 199328  
Test suite: 104  
Added byCharles Oliveira
LanguageC
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 Code 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): 331,438,450,461,462,592 CWE-476
* line(s): 521 CWE-561
File(s)
Flaw

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

File Contains:
CWE-476: NULL Pointer Dereference on line(s): 331, 438, 450, 461, 462, 592
CWE-686: Function Call With Incorrect Argument Type on line(s): 52, 73, 93, 113, 140, 224, 249, 297, 353, 380, 422, 490, 527
CWE-561: Dead Code on line(s): 521
CWE-685: Function Call With Incorrect Number of Arguments on line(s): 160, 181, 456
CWE-628: Function Call with Incorrectly Specified Arguments on line(s): 200