Displaying test cases 40501 - 40525 of 45437 in total
-
This test case shows no double free weakness.
-
CWE: 90 LDAP Injection BadSource: file Read input from a file GoodSource: Use a fixed string Sink: BadSink : data concatenated into LDAP search, which could result in LDAP Injection Flow Variant: 06 Control flow: if(STATIC_CONST_FIVE==5) and if(STATIC_CONST_FIVE!=5)
-
CWE: 775 Missing Release of File Descriptor or Handle After Effective Lifetime BadSource: Open a file using open() Sinks: GoodSink: Close the file using close() BadSink : Do not close file Flow Variant: 03 Control flow: if(5==5) and if(5!=5)
-
CWE: 773 Missing Reference to Active File Descriptor or Handle BadSource: Create a file descriptor using open() Sinks: GoodSink: Close the file before reusing the file descriptor BadSink : Reassign the file descriptor before closing the file Flow Variant: 10 Control flow: if(globalTrue) and...
-
CWE: 761 Free Pointer not at Start of Buffer BadSource: environment Read input from an environment variable Sinks: GoodSink: free() memory correctly at the start of the buffer BadSink : free() memory not at the start of the buffer Flow Variant: 68 Data flow: data passed as a global variable ...
-
CWE: 758 Undefined Behavior Sinks: alloca_use GoodSink: Initialize then use data BadSink : Use data from alloca without initialization Flow Variant: 14 Control flow: if(globalFive==5) and if(globalFive!=5)
-
CWE: 665 Improper Initialization BadSource: Do not initialize data properly GoodSource: Initialize data Sinks: cat BadSink : Copy string to data using strcat Flow Variant: 65 Data/control flow: data passed as an argument from one function to a function in a different source file called via ...
-
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: 52 Data flow: data passed as an argument from one function to another to another in three different source files
-
CWE: 511 Logic Time Bomb Sinks: w32CompareFileTime GoodSink: After a certain date, do something harmless BadSink : After a certain date, do something bad Flow Variant: 16 Control flow: while(1)
-
CWE: 506 Embedded Malicious Code Sinks: connect_socket BadSink : Send file contents using a connect socket (client side) BadOnly (No GoodSink) Flow Variant: 06 Control flow: if(STATIC_CONST_FIVE==5)
-
CWE: 478 Missing Default Case in Switch Sinks: GoodSink: Use default case in switch statement BadSink : No default case in a switch statement Flow Variant: 18 Control flow: goto statements
-
CWE: 398 Poor Code Quality Sinks: equals GoodSink: Set a variable equal to another variable BadSink : Setting a variable equal to itself has no effect Flow Variant: 03 Control flow: if(5==5) and if(5!=5)
-
CWE: 284 Improper Access Control Sinks: CreateWindowStation GoodSink: Create a windows station using CreateWindowStationW() without excessive privileges BadSink : Create a windows station using CreateWindowStationW() with excessive privileges Flow Variant: 14 Control flow: if(globalFive==5) a...
-
CWE: 253 Incorrect Check of Return Value Sinks: w32CreateNamedPipe GoodSink: Correctly check if CreateNamedPipeW() failed BadSink : Incorrectly check if CreateNamedPipeW() failed Flow Variant: 09 Control flow: if(GLOBAL_CONST_TRUE) and if(GLOBAL_CONST_FALSE)
-
CWE: 195 Signed to Unsigned Conversion Error BadSource: rand Set data to result of rand(), which may be zero GoodSource: Positive integer Sinks: memmove BadSink : Copy strings using memmove() with the length of data Flow Variant: 61 Data flow: data returned from one function to another in di...
-
CWE: 191 Integer Underflow BadSource: min Set data to the minimum value for int GoodSource: Set data to a small, non-zero number (negative two) Sinks: sub GoodSink: Ensure there will not be an underflow before subtracting 1 from data BadSink : Subtract 1 from data, which can cause an Underfl...
-
CWE: 190 Integer Overflow BadSource: fgets Read data from the console using fgets() 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 Variant: 12 ...
-
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: 01 Baseline
-
CWE: 134 Uncontrolled Format String BadSource: listen_socket Read data using a listen socket (server side) GoodSource: Copy a fixed string into data Sinks: vprintf GoodSink: vwprintf with a format string BadSink : vwprintf without a format string Flow Variant: 06 Control flow: if(STATIC_CON...
-
CWE: 134 Uncontrolled Format String BadSource: file Read input from a file GoodSource: Copy a fixed string into data Sinks: w32_vsnprintf GoodSink: _vsnwprintf with a format string BadSink : _vsnwprintf without a format string Flow Variant: 09 Control flow: if(GLOBAL_CONST_TRUE) and if(GLOB...
-
CWE: 126 Buffer Overread BadSource: large Large index value that is greater than 10-1 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: 15 Control flow: swit...
-
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: 51 Data flow:...
-
CWE: 121 Stack 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: 52 Data flow: data passed as an argument from one function to another to another in three diffe...
-
CWE: 121 Stack 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 wcsncpy Flow Variant: 06 Control flow: if(STATIC_CONST_FIVE==5) and if(STATIC_CONST_FIVE!=5)
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sink: memcpy BadSink : Copy int array to data using memcpy Flow Variant: 07 Control flow: if(staticFive==5) and if(staticFive!=5)