Displaying test cases 71501 - 71525 of 74755 in total
-
CWE: 131 Incorrect Calculation of Buffer Size 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: cpy BadSink : Copy string to data using wcscpy() Flow Variant: 13 Control flow: ...
-
CWE: 131 Incorrect Calculation of Buffer Size 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: 07 Control flo...
-
CWE: 126 Buffer Over-read BadSource: Set data pointer to a small buffer GoodSource: Set data pointer to a large buffer Sinks: memcpy BadSink : Copy data to string using memcpy Flow Variant: 66 Data flow: data passed in an array from one function to another in different source files
-
CWE: 126 Buffer Over-read BadSource: Set data pointer to a small buffer GoodSource: Set data pointer to a large buffer Sink: memcpy BadSink : Copy data to string using memcpy Flow Variant: 09 Control flow: if(global_const_t) and if(global_const_f)
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: memmove BadSink : Copy string to data using memmove Flow Variant: 41 Data flow: data passed as an argument from one function to anot...
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: memmove BadSink : Copy string to data using memmove Flow Variant: 04 Control flow: if(static_const_t) and if(static_const_f)
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: loop BadSink : Copy string to data using a loop Flow Variant: 12 Control flow: if(global_returns_t_or_f())
-
CWE: 124 Buffer Underwrite BadSource: Set data pointer to before the allocated memory buffer GoodSource: Set data pointer to the allocated memory buffer Sink: memcpy BadSink : Copy string to data using memcpy Flow Variant: 13 Control flow: if(global_const_five==5) and if(global_const_five!=5)
-
CWE: 123 Write-What-Where Condition BadSource: listen_socket Overwrite linked list pointers using a listen socket (server side) GoodSource: Don't overwrite linked list pointers Sink: BadSink : Remove element from list Flow Variant: 18 Control flow: goto statements
-
CWE: 122 Heap Based Buffer Overflow Sinks: type_overrun_memcpy GoodSink: Perform the memcpy() and prevent overwriting part of the structure BadSink : Overwrite part of the structure by incorrectly using the sizeof(struct) in memcpy() Flow Variant: 04 Control flow: if(static_const_t) and if(st...
-
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: cat BadSink : Copy string to data using wcscat Flow Variant: 09 Control flow: if(global_const_t) and if(gl...
-
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: 65 Data/control flow: data passed as an argument from one function to a function in a different...
-
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: 05 Control flow: if(static_t) and if(static_f)
-
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 Sink: memmove BadSink : Copy int array to data using memmove Flow Variant: 52 Data flow: data passed as an...
-
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 int array to data using a loop Flow Variant: 61 Data flow: data returned from o...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Initialize data as a large string GoodSource: Initialize data as a small string Sink: ncat BadSink : Copy data to string using wcsncat Flow Variant: 02 Control flow: if(1) and if(0)
-
CWE: 121 Stack 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 strcat Flow Variant: 51 Data flow: data passed as an argument from one function to another in different source files
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sink: ncat BadSink : Copy string to data using wcsncat Flow Variant: 15 Control flow: switch(6)
-
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 twoints array to data using memmove Flow Variant: 45 Data flow: data passed as a static global variable from one function to anoth...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sinks: loop BadSink : Copy twoints array to data using a loop Flow Variant: 44 Data/control flow: data passed as an argument from one function to a function in ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sink: memmove BadSink : Copy long long array to data using memmove Flow Variant: 52 Data flow: data passed as an argument from one function to another to anothe...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sinks: memcpy BadSink : Copy long long array to data using memcpy Flow Variant: 64 Data flow: void pointer to data passed from one function to another in differ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sinks: loop BadSink : Copy int array to data using a loop Flow Variant: 44 Data/control flow: data passed as an argument from one function to a function in the ...
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sink: ncat BadSink : Copy string to data using strncat Flow Variant: 05 Control flow: if(static_t) and if(static_f)
-
CWE: 121 Stack Based Buffer Overflow BadSource: Set data pointer to the bad buffer GoodSource: Set data pointer to the good buffer Sink: cat BadSink : Copy string to data using strcat Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; al...