Displaying test cases 23676 - 23700 of 25795 in total
-
CWE: 126 Buffer Over-read BadSource: Use a small buffer GoodSource: Use a large buffer Sinks: memcpy BadSink : Copy data to string using memcpy Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files
-
CWE: 126 Buffer Overread BadSource: fgets Read data from the console using fgets() 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 flow: data flows...
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: cpy BadSink : Copy string to data using wcscpy Flow Variant: 68 Data flow: data passed as a global variable from one function to ano...
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: cpy BadSink : Copy string to data using strcpy Flow Variant: 01 Baseline
-
CWE: 124 Buffer Underwrite BadSource: rand Set data to result of rand(), which may be zero 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: 73 Data flow: data p...
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sinks: memcpy BadSink : Copy string to data using memcpy Flow Variant: 81 Data flow: data passed in a parameter to an virtual method calle...
-
CWE: 124 Buffer Underwrite BadSource: listen_socket Read data using a listen socket (server 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: 81 Data flow:...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using malloc() and set data pointer to a small buffer GoodSource: Allocate using malloc() and set data pointer to a large buffer Sinks: ncpy BadSink : Copy string to data using wcsncpy Flow Variant: 73 Data flow: data passed in a list ...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using malloc() and set data pointer to a small buffer GoodSource: Allocate using malloc() and set data pointer to a large buffer Sinks: loop BadSink : Copy twoIntsStruct array to data using a loop Flow Variant: 74 Data flow: data passe...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Allocate using malloc() and set data pointer to a small buffer GoodSource: Allocate using malloc() and set data pointer to a large buffer Sinks: loop BadSink : Copy string to data using a loop Flow Variant: 84 Data flow: data passed to class co...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sink: cat BadSink : Copy data to string using wcscat Flow Variant: 10 Control flow: if(globalTrue) and if(globalFalse)
-
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: 06 Control flow: if(STATIC_CONST_FIVE==5) and...
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sink: snprintf BadSink : Copy data to string using snprintf Flow Variant: 09 Control flow: if(GLOBAL_CONST_TRUE) and if(GLOBAL_CONST_FALSE)
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sink: loop BadSink : Copy data to string using a loop Flow Variant: 22 Control flow: Flow controlled by value of a global variable. Sink functions are in a separate...
-
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: loop BadSink : Copy int array to data using a loop Flow Variant: 73 Data flow: data passed in a list from...
-
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: memmove BadSink : Copy int64_t array to data using memmove Flow Variant: 51 Data flow: data passed as an a...
-
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: loop BadSink : Copy TwoIntsClass array to data using a loop Flow Variant: 82 Data flow: data passed in a ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: cat BadSink : Copy data to string using wcscat Flow Variant: 73 Data flow: data passed in a list from one function to another in different source files
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: cat BadSink : Copy data to string using wcscat Flow Variant: 84 Data flow: data passed to class constructor and destructor by declaring the class object on ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string BadSink : Copy data to string using strcpy Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer
-
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: 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: 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: memmove BadSink : Copy string to data using memmove() Flow Variant: 72 Data flow: data pa...
-
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: 33 Data flow: use of a C++ r...
-
CWE: 121 Stack Based Buffer Overflow BadSource: fgets Read data from the console using fgets() 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: 84 Data flow...