Back to the previous page
Test Case ID | ![]() |
Bad / Good / Mixed | Good![]() |
Author | Toyota ITC |
Associations | Bad pair: 199265 Test suite: 104 |
Added by | Charles Oliveira |
Language | C |
Type of test case | Source Code |
Input string | |
Expected Output | |
Instructions | gcc -Wall -I ../../../shared/104 func_pointer.c func_pointer_main.c -lm -lpthread |
Submission date | 2016-07-22 |
Description | Defect Type: Pointer related defects Defect Sub-type: Bad cast of a function pointer Description: Defect Free Code to identify false positives in bad cast of function pointer The test case contains coincidental weaknesses along with intended ones as follows for file func_pointer.c: * line(s): 133,442 CWE-401 * line(s): 160,166,186,188,189,220,226,239,250,251,272,605,623 CWE-476 * line(s): 250 CWE-465 * line(s): 324,353 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): 160, 166, 186, 188, 189, 220, 226, 239, 250, 251, 272, 319, 605, 623
CWE-704: Incorrect Type Conversion or Cast on line(s): 45, 64, 85, 131, 180, 265, 296, 362, 388, 438, 479, 511, 555, 617
CWE-401: Improper Release of Memory Before Removing Last Reference ('Memory Leak') on line(s): 133, 442
CWE-561: Dead Code on line(s): 324, 353
CWE-465: Pointer Issues on line(s): 250
CWE-476: NULL Pointer Dereference on line(s): 160, 166, 186, 188, 189, 220, 226, 239, 250, 251, 272, 319, 605, 623
CWE-704: Incorrect Type Conversion or Cast on line(s): 45, 64, 85, 131, 180, 265, 296, 362, 388, 438, 479, 511, 555, 617
CWE-401: Improper Release of Memory Before Removing Last Reference ('Memory Leak') on line(s): 133, 442
CWE-561: Dead Code on line(s): 324, 353
CWE-465: Pointer Issues on line(s): 250