Displaying test cases 22651 - 22675 of 25795 in total
-
CWE: 126 Buffer Over-read BadSource: Use a small buffer GoodSource: Use a large buffer Sinks: memmove BadSink : Copy data to string using memmove Flow Variant: 44 Data/control flow: data passed as an argument from one function to a function in the same source file called via a function pointer
-
CWE: 126 Buffer Over-read BadSource: Use a small buffer GoodSource: Use a large buffer Sinks: loop BadSink : Copy data to string using a loop Flow Variant: 62 Data flow: data flows using a C++ reference from one function to another in different source files
-
CWE: 126 Buffer Over-read BadSource: Use a small buffer GoodSource: Use a large buffer Sink: loop BadSink : Copy data to string using a loop Flow Variant: 03 Control flow: if(5==5) and if(5!=5)
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sinks: cpy BadSink : Copy string to data using strcpy Flow Variant: 43 Data flow: data flows using a C++ reference from one function to an...
-
CWE: 124 Buffer Underwrite BadSource: connect_socket Read data using a connect socket (client side) GoodSource: Non-negative but less than 10 Sinks: GoodSink: Ensure the array index is valid BadSink : Improperly check the array index by not checking the lower bound Flow Variant: 62 Data flo...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sink: cpy BadSink : Copy string to data using strcpy Flow Variant: 07 Control flow: if(staticFive==5) and if(sta...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sinks: cat BadSink : Copy string to data using strcat Flow Variant: 82 Data flow: data passed in a parameter to ...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: ncpy BadSink : Copy data to string using strncpy Flow Variant: 62 Data flow: data flows using a C++ reference from one function to another in different sourc...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sink: loop BadSink : Copy string to data using a loop Flow Variant: 10 Control flow: if(globalTrue) and if(globa...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sinks: ncpy BadSink : Copy string to data using strncpy Flow Variant: 62 Data flow: data flows using a C++ refer...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sink: ncpy BadSink : Copy string to data using strncpy Flow Variant: 14 Control flow: if(globalFive==5) and if(g...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using new[] and set data pointer to a small buffer GoodSource: Allocate using new[] and set data pointer to a large buffer Sink: loop BadSink : Copy string to data using a loop Flow Variant: 12 Control flow: if(globalReturnsTrueOrFalse())
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate memory for a string, but do not allocate space for NULL terminator GoodSource: Allocate enough memory for a string and the NULL terminator Sinks: memcpy BadSink : Copy string to data using memcpy() Flow Variant: 74 Data flow: data pass...
-
CWE: 122 Heap Based Buffer Overflow BadSource: rand Set data to result of rand(), which may be zero GoodSource: Larger than zero but less than 10 Sinks: GoodSink: Ensure the array index is valid BadSink : Improperly check the array index by not checking the upper bound Flow Variant: 61 Data...
-
CWE: 122 Heap Based Buffer Overflow BadSource: rand Set data to result of rand(), which may be zero GoodSource: Larger than zero but less than 10 Sinks: GoodSink: Ensure the array index is valid BadSink : Improperly check the array index by not checking the upper bound Flow Variant: 32 Data...
-
CWE: 122 Heap Based Buffer Overflow BadSource: fscanf Read data from the console using fscanf() GoodSource: Larger than zero but less than 10 Sinks: GoodSink: Ensure the array index is valid BadSink : Improperly check the array index by not checking the upper bound Flow Variant: 43 Data flo...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data to a small buffer GoodSource: Initialize data to a buffer large enough to hold a TwoIntsClass Sinks: GoodSink: Allocate a new class using placement new and a buffer that is large enough to hold the class BadSink : Allocate a ne...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sinks: cpy BadSink : Copy string to data using strcpy Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files
-
CWE: 121 Stack Based Buffer Overflow BadSource: Point data to a buffer that does not have space for a NULL terminator GoodSource: Point data to a buffer that includes space for a NULL terminator Sinks: loop BadSink : Copy array to data using a loop Flow Variant: 73 Data flow: data passed in...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Point data to a buffer that does not have space for a NULL terminator GoodSource: Point data to a buffer that includes space for a NULL terminator Sinks: cpy BadSink : Copy string to data using wcscpy() Flow Variant: 72 Data flow: data passed ...
-
CWE: 114 Process Control BadSource: console Read input from the console GoodSource: Hard code the full pathname to the library Sinks: BadSink : Load a dynamic link library Flow Variant: 83 Data flow: data passed to class constructor and destructor by declaring the class object on the stack
-
CWE: 114 Process Control BadSource: file Read input from a file GoodSource: Hard code the full pathname to the library Sinks: BadSink : Load a dynamic link library Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
-
Integer variable is not initialized before its use.
-
The test case is a basic CGI source code which allows Cross-Site Scripting (XSS). The code has a Scope complexity.
-
created objects are never destroyed