Displaying test cases 18676 - 18700 of 25795 in total
-
CWE: 23 Relative Path Traversal BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Use a fixed file name Sink: open BadSink : Open the file named in data using open() Flow Variant: 10 Control flow: if(globalTrue) and if(globalFalse)
-
CWE: 23 Relative Path Traversal BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Use a fixed file name Sinks: ofstream BadSink : Open the file named in data using ofstream::open() Flow Variant: 63 Data flow: pointer to data passed from one function to anothe...
-
CWE: 23 Relative Path Traversal BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Use a fixed file name Sink: ofstream BadSink : Open the file named in data using ofstream::open() Flow Variant: 14 Control flow: if(globalFive==5) and if(globalFive!=5)
-
CWE: 23 Relative Path Traversal BadSource: file Read input from a file GoodSource: Use a fixed file name Sinks: ifstream BadSink : Open the file named in data using ifstream::open() Flow Variant: 84 Data flow: data passed to class constructor and destructor by declaring the class object on t...
-
CWE: 23 Relative Path Traversal BadSource: environment Read input from an environment variable GoodSource: Use a fixed file name Sinks: w32CreateFile BadSink : Open the file named in data using CreateFile() Flow Variant: 65 Data/control flow: data passed as an argument from one function to a...
-
CWE: 23 Relative Path Traversal BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Use a fixed file name Sinks: ofstream BadSink : Open the file named in data using ofstream::open() Flow Variant: 31 Data flow using a copy of data within the same function
-
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: 61 Data flow: data returned from one function to another in different source files
-
CWE: 23 Relative Path Traversal BadSource: file Read input from a file GoodSource: Use a fixed file name Sinks: ofstream BadSink : Open the file named in data using ofstream::open() Flow Variant: 65 Data/control flow: data passed as an argument from one function to a function in a different ...
-
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: 53 Data flow: data passed as an argument from one function through two ot...
-
CWE: 23 Relative Path Traversal BadSource: environment Read input from an environment variable GoodSource: Use a fixed file name Sinks: ifstream BadSink : Open the file named in data using ifstream::open() Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
-
CWE: 197 Numeric Truncation Error BadSource: fscanf Read data from the console using fscanf() GoodSource: Less than CHAR_MAX Sinks: to_short BadSink : Convert data to a short Flow Variant: 33 Data flow: use of a C++ reference to data within the same function
-
CWE: 194 Unexpected Sign Extension BadSource: rand Set data to result of RAND32(), which could be negative GoodSource: Positive integer Sinks: strncpy BadSink : Copy strings using strncpy() with the length of data Flow Variant: 83 Data flow: data passed to class constructor and destructor by...
-
CWE: 190 Integer Overflow BadSource: rand Set data to result of rand(), which may be zero GoodSource: Set data to a small, non-zero number (two) Sinks: add GoodSink: Ensure there will not be an overflow before adding 1 to data BadSink : Add 1 to data, which can cause an overflow Flow Varian...
-
CWE: 134 Uncontrolled Format String BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Copy a fixed string into data Sinks: w32_vsnprintf GoodSink: _vsnwprintf with a format string BadSink : _vsnwprintf without a format string Flow Variant: 83 Data flow: data...
-
CWE: 127 Buffer Under-read BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sinks: ncpy BadSink : Copy data to string using strncpy Flow Variant: 84 Data flow: data passed to class constructor and destructor by dec...
-
CWE: 127 Buffer Underread 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 to see if the value is negative Flow Varia...
-
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: 34 Data flow: use of a union containing two methods of accessing the same data (within the same function)
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer BadSink : Copy string to data using memmove Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer
-
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: 43 Data flow: data flows using a C++ reference from one function to another in the same source file
-
CWE: 122 Heap Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: loop BadSink : Copy data to string using a loop Flow Variant: 73 Data flow: data passed in a list from one function to another in different source files
-
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: memcpy BadSink : Copy string to data using memcpy Flow Variant: 03 Control flow: if(5==5) and if(5!=5)
-
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: 32 Data flow using two point...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sinks: memcpy BadSink : Copy data to string using memcpy Flow Variant: 83 Data flow: data passed to class constructor and destructor by declaring the class object ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sinks: memmove BadSink : Copy twoIntsStruct array to data using memmove Flow Variant: 81 Data flow: data passed in a parameter to an virtual method called via a...
-
Variable is initialized before use.