Displaying test cases 4976 - 5000 of 25795 in total
-
CWE: 90 LDAP Injection BadSource: console Read input from the console GoodSource: Use a fixed string Sinks: BadSink : data concatenated into LDAP search, which could result in LDAP Injection Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
-
CWE: 762 Mismatched Memory Management Routines BadSource: Allocate data using strdup() GoodSource: Allocate data using new Sinks: GoodSink: Deallocate data using free() BadSink : Deallocate data using delete Flow Variant: 65 Data/control flow: data passed as an argument from one function t...
-
CWE: 762 Mismatched Memory Management Routines BadSource: calloc Allocate data using calloc() GoodSource: Allocate data using new Sinks: GoodSink: Deallocate data using free() BadSink : Deallocate data using delete Flow Variant: 83 Data flow: data passed to class constructor and destructor ...
-
CWE: 590 Free Memory Not on Heap BadSource: alloca Data buffer is allocated on the stack with alloca() GoodSource: Allocate memory on the heap BadSink : Print then free data Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer
-
CWE: 590 Free Memory Not on Heap BadSource: placement_new Data buffer is declared on the stack GoodSource: Allocate memory on the heap Sinks: BadSink : Print then free data Flow Variant: 63 Data flow: pointer to data passed from one function to another in different source files
-
CWE: 590 Free Memory Not on Heap BadSource: static Data buffer is declared static on the stack GoodSource: Allocate memory on the heap Sink: BadSink : Print then free data Flow Variant: 11 Control flow: if(globalReturnsTrue()) and if(globalReturnsFalse())
-
CWE: 590 Free Memory Not on Heap BadSource: declare Data buffer is declared on the stack GoodSource: Allocate memory on the heap Sink: BadSink : Print then free data Flow Variant: 16 Control flow: while(1)
-
CWE: 590 Free Memory Not on Heap BadSource: alloca Data buffer is allocated on the stack with alloca() GoodSource: Allocate memory on the heap Sink: BadSink : Print then free data Flow Variant: 68 Data flow: data passed as a global variable from one function to another in different source files
-
CWE: 457 Use of Uninitialized Variable BadSource: Dont initialize data GoodSource: Initialize data Sinks: GoodSink: Initialize then use data BadSink : Use data Flow Variant: 01 Baseline
-
CWE: 415 Double Free BadSource: Allocate data using new and Deallocae data using delete GoodSource: Allocate data using new Sinks: GoodSink: do nothing BadSink : Deallocate data using delete Flow Variant: 63 Data flow: pointer to data passed from one function to another in different source...
-
CWE: 415 Double Free BadSource: Allocate data using new and Deallocae data using delete GoodSource: Allocate data using new Sinks: GoodSink: do nothing BadSink : Deallocate data using delete Flow Variant: 14 Control flow: if(globalFive==5) and if(globalFive!=5)
-
CWE: 415 Double Free BadSource: Allocate data using new and Deallocae data using delete GoodSource: Allocate data using new Sinks: GoodSink: do nothing BadSink : Deallocate data using delete Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fo...
-
CWE: 415 Double Free BadSource: Allocate data using new and Deallocae data using delete GoodSource: Allocate data using new Sinks: GoodSink: do nothing BadSink : Deallocate data using delete Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
-
CWE: 36 Absolute Path Traversal BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Full path and file name Sink: open BadSink : Open the file named in data using open() Flow Variant: 02 Control flow: if(1) and if(0)
-
CWE: 23 Relative Path Traversal BadSource: connect_socket Read data using a connect socket (client side) GoodSource: Use a fixed file name Sink: open BadSink : Open the file named in data using open() Flow Variant: 15 Control flow: switch(6)
-
CWE: 23 Relative Path Traversal BadSource: connect_socket Read data using a connect socket (client side) GoodSource: Use a fixed file name Sink: open BadSink : Open the file named in data using open() Flow Variant: 07 Control flow: if(staticFive==5) and if(staticFive!=5)
-
CWE: 23 Relative Path Traversal BadSource: file Read input from a file GoodSource: Use a fixed file name Sinks: w32CreateFile BadSink : Open the file named in data using CreateFile() Flow Variant: 62 Data flow: data flows using a C++ reference from one function to another in different source...
-
CWE: 23 Relative Path Traversal BadSource: environment Read input from an environment variable GoodSource: Use a fixed file name Sink: ifstream BadSink : Open the file named in data using ifstream::open() Flow Variant: 13 Control flow: if(GLOBAL_CONST_FIVE==5) and if(GLOBAL_CONST_FIVE!=5)
-
CWE: 122 Heap 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: 66 Data flow: data passed in an array from one function to another in different source files
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sink: ncpy BadSink : Copy data to string using strncpy Flow Variant: 08 Control flow: if(staticReturnsTrue()) and if(staticReturnsFalse())
-
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 int array to data using memmove Flow Variant: 07 Control flow: if(staticFive==5) an...
-
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 TwoIntsClass array to data using memmove Flow Variant: 11 Control flow: if(globalRe...
-
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 Sink: memcpy BadSink : Copy string to data using memcpy() Flow Variant: 15 Control flow: switch(6)
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: cpy BadSink : Copy data to string using strcpy 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: 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: 74 Data flow: data pa...