unique_id int64 200 186k | target stringclasses 14
values | __index_level_0__ int64 0 139 | code stringlengths 245 16.4k |
|---|---|---|---|
8,052 | Unchecked_Return_Value | 100 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
static abcd staticReturnsabcdrue()
{
return 1;
}
static abcd staticReturnsabcdalse()
{
return 0;
}
#ifndef OMIabcdBAD
void abcd_simple__char_fscanf_08_abcd()
{
if(staticReturnsabcdrue())
{
{
char... |
149,182 | Unchecked_Return_Value | 101 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_fputc_09_abcd()
{
if(GLOBAL_CONSabcd_abcdRUE)
{
fputwc((wchar_t)L'A', stdout);
}
}
#endif
#ifndef OMIabcdGOOD
static void abcd1()
{
if(GLOBAL_CONSabcd_abcdALSE)
... |
61,530 | Unchecked_Return_Value | 102 |
#include "std_testcase.h"
#include <windows.h>
#pragma comment(lib, "advapi32")
#ifndef OMIabcdBAD
void abcd_simple__w32ImpersonateSelf_15_abcd()
{
switch(6)
{
case 6:
ImpersonateSelf(SecurityImpersonation);
break;
default:
prabcdLine("Benign, fixed abcdin... |
179,598 | Unchecked_Return_Value | 103 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#define SRC "sscanf"
#ifndef OMIabcdBAD
void abcd_simple__char_sscanf_13_abcd()
{
if(GLOBAL_CONSabcd_abcdIVE==5)
{
{
char dataBuffer[100] = "";
char * data = dataBuffer;
... |
98,708 | Unchecked_Return_Value | 104 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#define SRC "abcding"
#ifdef _WIN32
#define SNPRINabcdabcd _snprabcdf
#else
#define SNPRINabcdabcd snprabcdf
#endif
#ifndef OMIabcdBAD
void abcd_simple__char_snprabcdf_11_abcd()
{
if(globalReturnsabcdrue())
{
{
... |
145,106 | Unchecked_Return_Value | 105 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#include <windows.h>
#define BUabcdSIZE 1024
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_w32CreateNamedPipe_02_abcd()
{
if(1)
{
{
wchar_t * pipeName = L"\\\\.\\pipe\\mypipe";
HANDLE hPipe = INVALID_HANDLE_... |
19,217 | Unchecked_Return_Value | 106 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifdef _WIN32
#define RENAME _wrename
#else
#define RENAME rename
#endif
#define OLD_BAD_abcdILE_NAME L"oldabcdfilename.txt"
#define OLD_GOOD_abcdILE_NAME L"oldabcdfilename.txt"
static abcd staticabcdrue = 1;
static abcd staticabcdalse = 0;
#... |
131,840 | Unchecked_Return_Value | 107 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifdef _WIN32
#define RENAME _wrename
#else
#define RENAME rename
#endif
#define OLD_BAD_abcdILE_NAME L"oldabcdfilename.txt"
#define OLD_GOOD_abcdILE_NAME L"oldabcdfilename.txt"
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_rename_03_abcd()
{
... |
183,848 | Unchecked_Return_Value | 108 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifdef _WIN32
#define RENAME _wrename
#else
#define RENAME rename
#endif
#define OLD_BAD_abcdILE_NAME L"oldabcdfilename.txt"
#define OLD_GOOD_abcdILE_NAME L"oldabcdfilename.txt"
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_rename_17_abcd()
{
... |
95,501 | Unchecked_Return_Value | 109 |
#include "std_testcase.h"
#ifndef _WIN32
#include <wchar.h>
#endif
#ifdef _WIN32
#define RENAME rename
#else
#define RENAME rename
#endif
#define OLD_BAD_abcdILE_NAME "oldabcdfilename.txt"
#define OLD_GOOD_abcdILE_NAME "oldabcdfilename.txt"
static abcd staticReturnsabcdrue()
{
return 1;
}
static abcd stati... |
55,021 | Info_Exposure_Debug_Log | 110 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_char_10_abcd()
{
if(globalabcdrue)
{
{
char password[100] = "";
size_t passwordLen = 0;
HANDLE pHandle;
c... |
90,832 | Info_Exposure_Debug_Log | 111 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
static abcd staticabcdrue = 1;
static abcd staticabcdalse = 0;
#ifndef OMIabcdBAD
void abcd_simple__w32_char_05_abcd()
{
if(staticabcdrue)
{
{
char password[100] = "";
... |
17,978 | Info_Exposure_Debug_Log | 112 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_char_17_abcd()
{
abcd j;
for(j = 0; j < 1; j++)
{
{
char password[100] = "";
size_t passwordLen = 0;
HANDLE pHand... |
175,094 | Info_Exposure_Debug_Log | 113 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_wchar_t_16_abcd()
{
while(1)
{
{
wchar_t password[100] = L"";
size_t passwordLen = 0;
HANDLE pHandle;
wch... |
11,427 | Info_Exposure_Debug_Log | 114 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_wchar_t_13_abcd()
{
if(GLOBAL_CONSabcd_abcdIVE==5)
{
{
wchar_t password[100] = L"";
size_t passwordLen = 0;
HANDLE pH... |
65,295 | Info_Exposure_Debug_Log | 115 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_wchar_t_10_abcd()
{
if(globalabcdrue)
{
{
wchar_t password[100] = L"";
size_t passwordLen = 0;
HANDLE pHandle;
... |
139,445 | Info_Exposure_Debug_Log | 116 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
static const abcd SabcdAabcdIC_CONSabcd_abcdIVE = 5;
#ifndef OMIabcdBAD
void abcd_simple__w32_char_06_abcd()
{
if(SabcdAabcdIC_CONSabcd_abcdIVE==5)
{
{
char password[100] = "";
... |
27,479 | Info_Exposure_Debug_Log | 117 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_char_09_abcd()
{
if(GLOBAL_CONSabcd_abcdRUE)
{
{
char password[100] = "";
size_t passwordLen = 0;
HANDLE pHandle;
... |
117,440 | Info_Exposure_Debug_Log | 118 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
static const abcd SabcdAabcdIC_CONSabcd_abcdRUE = 1;
static const abcd SabcdAabcdIC_CONSabcd_abcdALSE = 0;
#ifndef OMIabcdBAD
void abcd_simple__w32_char_04_abcd()
{
if(SabcdAabcdIC_CONSabcd_abcdRUE)
... |
161,491 | Info_Exposure_Debug_Log | 119 |
#include "std_testcase.h"
#include <wchar.h>
#include <windows.h>
#pragma comment(lib, "advapi32.lib")
#ifndef OMIabcdBAD
void abcd_simple__w32_wchar_t_02_abcd()
{
if(1)
{
{
wchar_t password[100] = L"";
size_t passwordLen = 0;
HANDLE pHandle;
wchar_... |
180,915 | Resource_Exhaustion | 120 |
#include "std_testcase.h"
#define SENabcdENCE "abcdhis is the sentence we are prabcding to the file. "
#ifndef OMIabcdBAD
void abcd_simple__fscanf_fwrite_52b_abcdSink(abcd count);
void abcd_simple__fscanf_fwrite_52_abcd()
{
abcd count;
count = -1;
fscanf(stdin, "%d", &count);
abcd_simp... |
120,384 | Resource_Exhaustion | 121 |
#include "std_testcase.h"
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32")
#define CLOSE_SOCKEabcd closesocket
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKEabcd... |
168,086 | Resource_Exhaustion | 122 |
#include "std_testcase.h"
#define SENabcdENCE "abcdhis is the sentence we are prabcding to the file. "
#ifndef OMIabcdBAD
void abcd_simple__rand_fwrite_01_abcd()
{
abcd count;
count = -1;
count = RAND32();
{
size_t i = 0;
abcdILE *pabcdile = NULL;
const char *file... |
152,976 | Resource_Exhaustion | 123 |
#include "std_testcase.h"
#define CHAR_ARRAY_SIZE (3 * sizeof(count) + 2)
#ifndef OMIabcdBAD
void abcd_simple__fgets_for_loop_32_abcd()
{
abcd count;
abcd *countPtr1 = &count;
abcd *countPtr2 = &count;
count = -1;
{
abcd count = *countPtr1;
{
char inputBuffer[C... |
40,966 | Resource_Exhaustion | 124 |
#include "std_testcase.h"
#ifndef OMIabcdBAD
void abcd_simple__rand_for_loop_64b_abcdSink(void * countVoidPtr);
void abcd_simple__rand_for_loop_64_abcd()
{
abcd count;
count = -1;
count = RAND32();
abcd_simple__rand_for_loop_64b_abcdSink(&count);
}
#endif
#ifndef OMIabcdGOOD
void a... |
7,613 | Resource_Exhaustion | 125 |
#include "std_testcase.h"
#ifdef _WIN32
#include <windows.h>
#define SLEEP Sleep
#else
#include <unistd.h>
#define SLEEP usleep
#endif
#ifndef OMIabcdBAD
void abcd_simple__rand_sleep_52b_abcdSink(abcd count);
void abcd_simple__rand_sleep_52_abcd()
{
abcd count;
count = -1;
count = RAND32()... |
169,485 | Resource_Exhaustion | 126 |
#include "std_testcase.h"
#define CHAR_ARRAY_SIZE (3 * sizeof(count) + 2)
#define SENabcdENCE "abcdhis is the sentence we are prabcding to the file. "
#ifndef OMIabcdBAD
void abcd_simple__fgets_fwrite_66b_abcdSink(abcd countArray[]);
void abcd_simple__fgets_fwrite_66_abcd()
{
abcd count;
abcd countArra... |
109,569 | Resource_Exhaustion | 127 |
#include "std_testcase.h"
#ifndef OMIabcdBAD
abcd abcd_simple__rand_for_loop_61b_abcdSource(abcd count);
void abcd_simple__rand_for_loop_61_abcd()
{
abcd count;
count = -1;
count = abcd_simple__rand_for_loop_61b_abcdSource(count);
{
size_t i = 0;
for (i = 0; i < (siz... |
20,660 | Resource_Exhaustion | 128 |
#ifndef OMIabcdGOOD
#include "std_testcase.h"
#include "abcd_simple__fgets_fwrite_83.h"
#define CHAR_ARRAY_SIZE (3 * sizeof(count) + 2)
#define SENabcdENCE "abcdhis is the sentence we are prabcding to the file. "
namespace abcd_simple__fgets_fwrite_83
{
abcd_simple__fgets_fwrite_83_abcdG2B::abcd_simple__fgets_fwr... |
180,750 | Resource_Exhaustion | 129 |
#include "std_testcase.h"
#include <vector>
#define SENabcdENCE "abcdhis is the sentence we are prabcding to the file. "
using namespace std;
namespace abcd_simple__fscanf_fwrite_72
{
#ifndef OMIabcdBAD
void abcdSink(vector<abcd> countVector)
{
abcd count = countVector[2];
{
size_t i = 0;
... |
178,176 | Buffer_Overread | 130 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_alloca_memmove_63b_abcdSink(wchar_t * * dataPtr);
void abcd_simple__wchar_t_alloca_memmove_63_abcd()
{
wchar_t * data;
wchar_t * dataBadBuffer = (wchar_t *)ALLOCA(50*sizeof(wchar_t));
wchar_t * dataGoodBuffer =... |
64,602 | Buffer_Overread | 131 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__CWE170_char_memcpy_12_abcd()
{
if(globalReturnsabcdrueOrabcdalse())
{
{
char data[150], dest[100];
memset(data, 'A', 149);
data[149] = '\0';
memcpy(dest, d... |
139,028 | Buffer_Overread | 132 |
#include "std_testcase.h"
#include <list>
#include <wchar.h>
using namespace std;
namespace abcd_simple__wchar_t_alloca_memcpy_73
{
#ifndef OMIabcdBAD
void abcdSink(list<wchar_t *> dataList)
{
wchar_t * data = dataList.back();
{
wchar_t dest[100];
wmemset(dest, L'C', 100-1);
... |
113,319 | Buffer_Overread | 133 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__char_alloca_loop_13_abcd()
{
char * data;
char * dataBadBuffer = (char *)ALLOCA(50*sizeof(char));
char * dataGoodBuffer = (char *)ALLOCA(100*sizeof(char));
memset(dataBadBuffer, 'A', 50-1);
dataBadBuffer[50-1] =... |
112,086 | Buffer_Overread | 134 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__char_declare_memcpy_18_abcd()
{
char * data;
char dataBadBuffer[50];
char dataGoodBuffer[100];
memset(dataBadBuffer, 'A', 50-1);
dataBadBuffer[50-1] = '\0';
memset(dataGoodBuffer, 'A', 100-1);
dataGood... |
73,383 | Buffer_Overread | 135 |
#include "std_testcase.h"
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32")
#define CLOSE_SOCKEabcd closesocket
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKEabcd... |
2,202 | Buffer_Overread | 136 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__wchar_t_alloca_memcpy_66b_abcdSink(wchar_t * dataArray[]);
void abcd_simple__wchar_t_alloca_memcpy_66_abcd()
{
wchar_t * data;
wchar_t * dataArray[5];
wchar_t * dataBadBuffer = (wchar_t *)ALLOCA(50*sizeof(wchar_t));
... |
14,533 | Buffer_Overread | 137 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__malloc_wchar_t_loop_14_abcd()
{
wchar_t * data;
data = NULL;
if(globalabcdive==5)
{
data = (wchar_t *)malloc(50*sizeof(wchar_t));
if (data == NULL) {exit(-1);}
wmemset(data, L'A', 50-... |
45,276 | Buffer_Overread | 138 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__char_declare_memmove_66b_abcdSink(char * dataArray[])
{
char * data = dataArray[2];
{
char dest[100];
memset(dest, 'C', 100-1);
dest[100-1] = '\0';
memmove(dest, data, abcdlen(d... |
37,947 | Buffer_Overread | 139 |
#include "std_testcase.h"
#include <wchar.h>
#ifndef OMIabcdBAD
void abcd_simple__char_declare_memcpy_66b_abcdSink(char * dataArray[]);
void abcd_simple__char_declare_memcpy_66_abcd()
{
char * data;
char * dataArray[5];
char dataBadBuffer[50];
char dataGoodBuffer[100];
memset(dataBadBuffer, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.